Re: [csswg-drafts] [css-contain-2] Clarify whether content-visibility: auto subtree elements are visible in accessibility (#5857)

I agree with the above reasoning for the most part. One distinction I'd like to draw is how much of the style we need for all of the cases you mentioned:

1. Find-in-page is an explicit (uncommon) request by the user, it needs enough style to find the next match. This can either be done by forcing the style update on each content-visibility: auto element, trying to find the match, and failing to do that continuing onto the next content-visibility: auto element. (Full disclosure: Chromium forces the update on all content-visibility: auto elements, since we believe that find-in-page requiring an extra bit of rendering is acceptable, but that's an implementation detail not a requirement).
2. tabbing/focussing is also an explicit request by the user, but arguably more common. The way it's done in Chromium is to find the next _potential_ focusable element in the DOM, update its style to ensure that it is indeed not hidden in any way. So in effect we would still update one content-visibility: auto subtree at a time.
3. For accessibility, we have to produce the full accessibility tree to an external AT, such as a screen reader, regardless of how much or how little the user intends to explore it. This means we have to update the style for every content-visibility: auto element, regardless of its distance to the viewport.

So for cases other than accessibility, we style in response to an explicit user action and we are able to only style a subset of content. In accessibility, the mere presence of accessibility tech would cause us to always update style and it has to be done on all content-visibility: auto elements.

As was mentioned in the meeting, this also potentially exposes a11y users via timing attacks. Or is the proposal to always style content-visibility: auto elements, regardless of a11y?


-- 
GitHub Notification of comment by vmpstr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5857#issuecomment-801973841 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 18 March 2021 14:27:43 UTC