Skip to content

Commit 9b51686

Browse files
committed
[selectors-4] Make empty language strings match untagged elements. #6915
1 parent d42a578 commit 9b51686

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()''</h3>
19151915
when represented in BCP 47 syntax [[BCP47]],
19161916
it matches that <a>language range</a> in an <var>extended filtering</var>
19171917
operation per [[RFC4647]] <cite>Matching of Language Tags</cite> (section 3.3.2).
1918+
For this purpose, a wildcard [=language range=] (<code>"*"</code>) does not match
1919+
elements whose language is not tagged (e.g. <code>lang=""</code>),
1920+
but does match elements whose language is tagged as undetermined (<code>lang=und</code>).
19181921
The matching is performed [=ASCII case-insensitively=].
19191922
The <a>language range</a> 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 <code>xml:lang</code> attributes. [[XML10]]

0 commit comments

Comments
 (0)