Skip to content

Commit b745415

Browse files
committed
[selectors-4] Whoops, attr-selectors allow whitespace between any of their tokens. Fixes #3151.
1 parent d0d6877 commit b745415

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

selectors-4/Overview.bs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,14 +2240,14 @@ The Focus-Indicated Pseudo-class: '':focus-visible''</h3>
22402240
<em>and</em> the user agent determines via heuristics
22412241
that the focus should be made evident on the element.
22422242

2243-
2244-
Note: The intent of '':focus-visible'' is
2243+
2244+
Note: The intent of '':focus-visible'' is
22452245
to allow authors to provide <em>clearly identifiable</em> focus styles
22462246
which are visible when a user is likely to need to understand where focus is,
22472247
and not visible in other cases.
22482248

22492249
<div class="example">
2250-
In this example,
2250+
In this example,
22512251
all focusable elements get a strong yellow outline on '':focus-visible'',
22522252
and links get both a yellow outline and a yellow background on '':focus-visible''.
22532253
These styles are consistent throughout the page and are easily visible
@@ -2276,40 +2276,40 @@ The Focus-Indicated Pseudo-class: '':focus-visible''</h3>
22762276
* If a user has expressed a preference
22772277
(such as via a system preference or a browser setting)
22782278
to always see a visible focus indicator,
2279-
the user agent should honor this
2279+
the user agent should honor this
22802280
by having '':focus-visible'' always match on the active element,
22812281
regardless of any other factors.
22822282
(Another option may be for the user agent to show its own focus indicator
22832283
regardless of author styles.)
22842284
* Any element which supports keyboard input
2285-
(such as an <{input}> element,
2286-
or any other element
2285+
(such as an <{input}> element,
2286+
or any other element
22872287
which may trigger a virtual keyboard to be shown on focus
2288-
if a physical keyboard is not present)
2288+
if a physical keyboard is not present)
22892289
should <strong>always</strong> match '':focus-visible'' when focused.
22902290
* If the user interacts with the page via the keyboard,
22912291
the currently focused element should match '':focus-visible''
22922292
(i.e. keyboard usage may change whether this pseudo-class matches
2293-
even if it doesn't affect '':focus'').
2293+
even if it doesn't affect '':focus'').
22942294
* If the user interacts with the page via a pointing device,
2295-
such that the focus is moved to a new element
2295+
such that the focus is moved to a new element
22962296
which does <em>not</em> support user input,
2297-
the newly focused element
2297+
the newly focused element
22982298
should <strong>not</strong> match '':focus-visible''.
2299-
* If the active element matches '':focus-visible'',
2299+
* If the active element matches '':focus-visible'',
23002300
and a script causes focus to move elsewhere,
23012301
the newly focused element should match '':focus-visible''.
2302-
* Conversely, if the active element does not match '':focus-visible'',
2303-
and a script causes focus to move elsewhere,
2302+
* Conversely, if the active element does not match '':focus-visible'',
2303+
and a script causes focus to move elsewhere,
23042304
the newly focused element should <strong>not</strong> match '':focus-visible''.
23052305

23062306
User agents should also use '':focus-visible'' to specify the default focus style,
2307-
so that authors using '':focus-visible'' will not also need to disable
2307+
so that authors using '':focus-visible'' will not also need to disable
23082308
the default '':focus'' style.
23092309
</div>
23102310

23112311
<div class=example>
2312-
In this example,
2312+
In this example,
23132313
authors use a '':not()'' pseudo-class to remove default user agent focus styling
23142314
if '':focus-visible'' is supported,
23152315
and provide enhanced focus styling via '':focus-visible''.
@@ -3445,6 +3445,7 @@ Grammar</h2>
34453445
* Around or in place of a <<combinator>>
34463446
* Between the parentheses and argument of
34473447
a functional <<pseudo-class-selector>> or <<pseudo-element-selector>>.
3448+
* Between any of the tokens of an <<attribute-selector>>.
34483449
* The four <a href="https://www.w3.org/TR/CSS2/selectors.html#pseudo-element-selectors">Level 2</a> <a>pseudo-elements</a>
34493450
(''::before'', ''::after'', ''::first-line'', and ''::first-letter'')
34503451
may, for legacy reasons,

0 commit comments

Comments
 (0)