This change means that elements that have CSS display:contents can be focusable. In other words, if they would have been focusable without display:contents, display:contents will no longer change that. Before this change, elements with display:contents could never be focused. Developers making elements with display:contents that can be focused need to ensure that such elements have appropriate styles to make the focus visually apparent, since they will not have a default focus outline.
Elements with display:contents are exposed to assistive technology as having their normal roles (as though they had their default display). The contract for the meaning of accessibility roles includes support for certain role-specific keyboard interactions which often include focusability. So it's important that the exposure to AT match the focusability. The CSS Working Group has concluded that both AT exposure and focusability should be as-normal. Prior to this change, AT exposure was interoperably as specified, but such elements were interoperably not focusable.
This is proposing to change a currently interoperable behavior. This has some risk that other engines won't match the change and we'll end up with less interoperability. However, I think there is probably enough support from other engines at this point that we should take the lead and hope that other engines will soon follow.
This fixes what appears to be one of the obstacles for developers to use display:contents in a way that is accessible. While in the short term it reduces interoperability (since engines agree on the current "bad" behavior), the long term goal is that engines will converge on the new behavior, and this will lead to increased developer confidence in and increased usability of CSS display:contents.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
https://github.com/web-platform-tests/wpt/pull/39247
No milestones specified
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAG0MU3irORkF9G%3Dkr-KJF0hvoYbTpdpmYordQ1qi6w3s2jd5Fw%40mail.gmail.com.
So I think my preference for outline is that we say that if a developer is going to depend on focusability of something with display: contents, they need to add appropriate styles to draw the focus outline (for example, by drawing it on an appropriate descendant or descendants).I admit that developers aren't going to get that right all the time. But the same is true of the current situation. That is, I think developers will sometimes not do what we want if we say either of:
- developers shouldn't use display: contents if they need an element to be focusable, or
- developers should add appropriate focus styles if they use display: contents on something that is focusable.
(Note that needing an element to be focusable is often a need for users using keyboard navigation or similar, that may not apply to users using a mouse. So developers may well miss it.)Then the question is which problem is worse: is it worse to have an element that the user needs to get to but that can't be focused at all, or worse to have it be focusable but without a good indication that it's focused. The latter at least gives a keyboard user a chance to figure out what's going on, whereas with the former they're out of luck. So my inclination is that having the element be focusable but without an indication of focus is less bad than having it not be focusable at all when it should be. I admit that this is just my instinct and I haven't attempted to confirm this. And there's also the confounding factor that the two problems might occur at different rates.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAG0MU3gOw1Bmzv0mVsA-PeYRyJDRWYEgShedyErcktooY0jovw%40mail.gmail.com.
Contact emailsdba...@chromium.org
ExplainerNone
Specificationhttps://github.com/w3c/csswg-drafts/issues/2632#issuecomment-438851770
SummaryThis change means that elements that have CSS display:contents can be focusable. In other words, if they would have been focusable without display:contents, display:contents will no longer change that. Before this change, elements with display:contents could never be focused. Developers making elements with display:contents that can be focused need to ensure that such elements have appropriate styles to make the focus visually apparent, since they will not have a default focus outline.
Blink componentBlink>HTML>Focus
MotivationElements with display:contents are exposed to assistive technology as having their normal roles (as though they had their default display). The contract for the meaning of accessibility roles includes support for certain role-specific keyboard interactions which often include focusability. So it's important that the exposure to AT match the focusability. The CSS Working Group has concluded that both AT exposure and focusability should be as-normal. Prior to this change, AT exposure was interoperably as specified, but such elements were interoperably not focusable.
Search tagsCSS, a11y, accessibility, focus
TAG reviewNone
TAG review statusNot applicable
Risks
Interoperability and CompatibilityThis is proposing to change a currently interoperable behavior. This has some risk that other engines won't match the change and we'll end up with less interoperability. However, I think there is probably enough support from other engines at this point that we should take the lead and hope that other engines will soon follow.
Gecko: Positive (https://github.com/mozilla/standards-positions/issues/772)
WebKit: No signal (https://github.com/WebKit/standards-positions/issues/164) No official position but https://github.com/web-platform-tests/interop/issues/568 does show Safari interest in the topic.
Web developers: No signals
Other signals: Positive advocacy from users / user advocates such as in https://bugs.chromium.org/p/chromium/issues/detail?id=1366037 and https://github.com/web-platform-tests/interop/issues/568
ActivationThis fixes what appears to be one of the obstacles for developers to use display:contents in a way that is accessible. While in the short term it reduces interoperability (since engines agree on the current "bad" behavior), the long term goal is that engines will converge on the new behavior, and this will lead to increased developer confidence in and increased usability of CSS display:contents.
WebView application risksDoes this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
DebuggabilityNone
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?Yes
Is this feature fully tested by web-platform-tests?Yeshttps://github.com/web-platform-tests/wpt/pull/39247
Flag name on chrome://flagsNone
Finch feature namekDisplayContentsFocusable
Requires code in //chrome?False
Estimated milestonesNo milestones specified
Anticipated spec changesOpen questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None
Link to entry on the Chrome Platform Statushttps://chromestatus.com/feature/6237396851228672
On Tuesday, January 9, 2024 at 5:39:19 PM UTC+1 David Baron wrote:Contact emailsdba...@chromium.org
ExplainerNone
Specificationhttps://github.com/w3c/csswg-drafts/issues/2632#issuecomment-438851770Is this actually defined in the spec? Should the spec be more explicit about it?
Interoperability and CompatibilityThis is proposing to change a currently interoperable behavior. This has some risk that other engines won't match the change and we'll end up with less interoperability. However, I think there is probably enough support from other engines at this point that we should take the lead and hope that other engines will soon follow.
What about compat? Would existing users of `display: contents` have their keyboard flows disrupted by this change?
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAG0MU3gZiQxJ3P4rBgadJT-HLR51ru_RhcXAj-oFSBy2UWL5Vg%40mail.gmail.com.
On Wed, Jan 10, 2024 at 11:14 AM Yoav Weiss <yoav...@chromium.org> wrote:On Tuesday, January 9, 2024 at 5:39:19 PM UTC+1 David Baron wrote:Contact emailsdba...@chromium.org
ExplainerNone
Specificationhttps://github.com/w3c/csswg-drafts/issues/2632#issuecomment-438851770Is this actually defined in the spec? Should the spec be more explicit about it?There was certainly some disagreement about that, but whatwg/html#9425 makes it much more explicit.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYfiZNKZn_3Lq%2BZVU2ZZVOH_jVtaqtvZmN0XJ9s%3DvrjA8g%40mail.gmail.com.