Re: [csswg-drafts] [css-contain-3] Proposal: Add an event to fire when content-visibility: auto state changes (#7384)

I have some concerns regarding accessibility here.

I understand that this event doesn't facilitate anything that isn't already possible with other functionality (e.g. IntersectionObserver and MutationObserver) and that isn't already being done (e.g. by virtual scrollers). However, there's a difference between "authors can already do this" vs "the spec includes something which is intended to be used in a certain way that will fundamentally cause this problem". In the former case, it's reasonable to argue that if an author is doing something a little obscure, they must understand the consequences across the board. In the latter case, the web platform is providing a feature which authors can reasonably expect to "just work".

The primary use case for this feature - stopping DOM updates to a subtree that is not rendered (as outlined in the explainer) - will cause pretty severe problems for a11y. It's not a technical problem with the event itself, but it is a problem with the way that it is intended to be used. The decision was made to expose content-visibility: auto in the a11y tree on the basis that the content was still semantically relevant; it just wasn't visually relevant right now. The intent behind this event fundamentally changes that logic.

I don't think adding a note is sufficient to resolve this. If the primary use case causes problems for a11y, either that use case needs to be normatively forbidden by the spec or the technique needs to be fixed somehow to avoid this problem.

There are likely use cases that don't cause problems for a11y; e.g. stopping computation that wouldn't affect the DOM, stopping canvas updates, etc. Those use cases are fine. While i realise there is often a preference to avoid codifying specific use cases into specs, I think this is potentially warranted when primary use cases might cause significant harm.

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


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

Received on Wednesday, 20 July 2022 07:41:39 UTC