Skip to content

Commit c55ef6b

Browse files
committed
[selectors-4] Make empty language strings match untagged elements. w3c#6915
1 parent 8ade897 commit c55ef6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

selectors-4/Overview.bs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,10 +1915,17 @@ The Language Pseudo-class: '':lang()''
19151915
when represented in BCP 47 syntax [[BCP47]],
19161916
it matches that language range in an extended filtering
19171917
operation per [[RFC4647]] Matching of Language Tags (section 3.3.2).
1918+
For this purpose, a wildcard [=language range=] ("*") does not match
1919+
elements whose language is not tagged (e.g. lang=""),
1920+
but does match elements whose language is tagged as undetermined (lang=und).
19181921
The matching is performed [=ASCII case-insensitively=].
19191922
The language range does not need to be a valid language code to
19201923
perform this comparison.
19211924

1925+
A [=language range=] consisting of an empty string
1926+
('':lang("")'')
1927+
matches (only) elements whose language is not tagged.
1928+
19221929
Note: It is recommended that documents and protocols
19231930
indicate language using codes from [[BCP47]] or its successor,
19241931
and in the case of XML-based formats, by means of xml:lang attributes. [[XML10]]

0 commit comments

Comments
 (0)