-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:active and activating via the keyboard #7578
Comments
The "normal a" link in https://output.jsbin.com/hujeguhivo throws a wrench into this ontology. Apparently keydown on the Enter key will navigate a link, and will not cause that link to match |
This removes the disabled condition for :active, matching Gecko and WebKit. The condition was added to the spec in 9985973 but not implemented uniformly. As discussed in #6635, it doesn't work very well and is inconsistent with other similar pseudo-classes, like :hover. This also removes the consideration of <link> elements with href="" attributes for :active, since they no longer have activation behavior as of 1e0ee7f. Finally, this updates the definitions of both :active and :hover to be based on the latest Selectors spec, which notably includes the ancestor condition over the flat tree at the CSS layer, instead of having HTML handle that. This required splitting up "being activated" and "matches :active", as well as "designated" and "matches :hover". Closes #6635, although note that there remain other interop issues with :active, tracked in #7578.
This removes the disabled condition for :active, matching Gecko and WebKit. The condition was added to the spec in 9985973 but not implemented uniformly. As discussed in whatwg#6635, it doesn't work very well and is inconsistent with other similar pseudo-classes, like :hover. This also removes the consideration of <link> elements with href="" attributes for :active, since they no longer have activation behavior as of 1e0ee7f. Finally, this updates the definitions of both :active and :hover to be based on the latest Selectors spec, which notably includes the ancestor condition over the flat tree at the CSS layer, instead of having HTML handle that. This required splitting up "being activated" and "matches :active", as well as "designated" and "matches :hover". Closes whatwg#6635, although note that there remain other interop issues with :active, tracked in whatwg#7578.
Ah, I was going to file an issue about this stuff because @dshin-moz and I were looking at some Other things that are funny about this:
It'd be nice to get better spec text for how this is supposed to work... cc @smaug---- |
The behavior of |
…mpleted. Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1759031 gecko-commit: ab075d8118aecde5cf88872225b85effcfffbacb gecko-reviewers: emilio
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463
…mpleted. Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1759031 gecko-commit: adc6a6f51dfa6facc44c1afe4bf3455c3bf32fad gecko-reviewers: emilio
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463
…mpleted. Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1759031 gecko-commit: adc6a6f51dfa6facc44c1afe4bf3455c3bf32fad gecko-reviewers: emilio
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463 UltraBlame original commit: ab075d8118aecde5cf88872225b85effcfffbacb
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463 UltraBlame original commit: adc6a6f51dfa6facc44c1afe4bf3455c3bf32fad
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463 UltraBlame original commit: ab075d8118aecde5cf88872225b85effcfffbacb
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463 UltraBlame original commit: adc6a6f51dfa6facc44c1afe4bf3455c3bf32fad
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463 UltraBlame original commit: ab075d8118aecde5cf88872225b85effcfffbacb
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463 UltraBlame original commit: adc6a6f51dfa6facc44c1afe4bf3455c3bf32fad
…ions being completed. r=emilio Previously, the test relied upon event listener to listen to related events: e.g. `mousedown` event on `Actions().pointerDown()`. However, as comments in whatwg/html#7578 indicate when `:active` matches does not seem to be interoperable across browsers with different inputs. Instead rely on the action sequence being completed, as done with a simliar test, `html/semantics/selectors/pseudo-classes/active-disabled.html`. Differential Revision: https://phabricator.services.mozilla.com/D193463
A bunch of pointers to related things here:
|
Spinning off from #6635 (comment) . Question: when does
:active
match? #7465 takes care of some of the current interop problems, but isn't merged yet due to lack of tests; let's use https://whatpr.org/html/7465/semantics-other.html#selector-active as the working definition for this issue.https://jsbin.com/cifugag/1/edit?html,output shows that the spec does not match either Firefox or Chrome:
Spec: pressing spacebar on the
<input type=radio>
must not match:active
, since it's not on the special list of elements for which "in a formal activation state" applies. Pressing spacebar on the<button>
must match:active
, since it is on that list.Firefox: pressing spacebar never causes any elements to match
:active
. Only the "being actively pointed at" clause applies.Chrome: pressing spacebar causes both the
<input type=radio>
and the<button>
to match:active
. It does not cause the<div>
to match:active
. Chrome appears to be applying the "in a formal activation state" definition to any element with activation behavior, which includes radio buttons but not divs.Safari: ???
I personally think the Chrome behavior makes the most sense (as it gives keyboard users and mouse users the same experience). The next step is to test Safari to see if that can give us any input.
The text was updated successfully, but these errors were encountered: