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 08:18:58 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-460163010-1549268337-sysbot+gh@w3.org>
@bkardell wrote:
> the computed role is sometimes involves fairly complex checking and tree walking.

As one example this complexity, review [`AccessibilityTable:isDataTable()` in the WebKit source](https://github.com/WebKit/webkit/blob/master/Source/WebCore/accessibility/AccessibilityTable.cpp#L112). 

In addition to hierarchical validation and well-formedness (`<tables>` do not get the table _role_ unless they have a valid grid of rows and cells), this method checks for a variety of style-based heuristics such as borders and zebra-striped row colors. It's determining layout-vs-data table based on the style characteristics, which then determine the role, and would only then affect the cascade for a `:role()` selector.

GitHub Notification of comment by cookiecrook
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3596#issuecomment-460163010 using your GitHub account
Received on Monday, 4 February 2019 08:18:59 UTC

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