Re: [csswg-drafts] [selectors] Add :role() pseudo-class (#3596)

That is the case, but Alice is correct that implementation proved significantly more challenging than expected. 

Style parsing needs to happen before layout and rendering. In WebKit (and Blink, maybe more) the accessibility tree is computed based on the render tree. Since accessibility can change the roles (or refuse to change the roles of malformed nodes), current implementations would either result in one of the following:

1. A circular dependency (neither style nor accessibility can proceed until the other is complete)

2. CSS parsing continues but later changes when accessibility loads could trigger new layout and repaints.

We left off that path by determining that a non-trivial amount of WebCore/Accessibility would need to moved out of the accessibility code and refactored to be used prior to layout.

It’s not impossible, but it’s quite a bit more than anyone was willing to commit to.

A WICG incubator may be a good path forward for this one. You’ll need implementor involvement and buy-in before the :role() selector can proceed.

GitHub Notification of comment by cookiecrook
Please view or discuss this issue at using your GitHub account

Received on Monday, 4 February 2019 05:31:27 UTC