W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2019

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

From: James Craig via GitHub <sysbot+gh@w3.org>
Date: Mon, 04 Feb 2019 05:31:25 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-460135566-1549258285-sysbot+gh@w3.org>
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 https://github.com/w3c/csswg-drafts/issues/3596#issuecomment-460135566 using your GitHub account
Received on Monday, 4 February 2019 05:31:27 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:43 UTC