Bug 174248

Summary: AX: Don't expose aria-roledescription value on "generic" elements (e.g. div and span) unless explicit role value is also defined
Product: WebKit Reporter: Joanmarie Diggs <jdiggs>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
andresg_22: review+, ews-feeder: commit-queue-
patch
andresg_22: review+, ews-feeder: commit-queue-
patch
none
patch
none
patch
none
patch none

Joanmarie Diggs
Reported 2017-07-07 03:13:13 PDT
The ARIA spec states: > User agents must not expose the aria-roledescription property if … The element to which aria-roledescription is applied does not have a valid WAI-ARIA role or does not have an implicit WAI-ARIA role semantic. There is concern that this requirement is overly restrictive, but consensus that things like <div aria-rolescription="button"> do need to be prevented. So let's at least address that worst-case scenario. See bug 163647 for more information.
Attachments
patch (6.10 KB, patch)
2022-04-21 22:46 PDT, chris fleizach
andresg_22: review+
ews-feeder: commit-queue-
patch (6.75 KB, patch)
2022-04-22 13:52 PDT, chris fleizach
andresg_22: review+
ews-feeder: commit-queue-
patch (7.36 KB, patch)
2022-04-25 00:15 PDT, chris fleizach
no flags
patch (7.33 KB, patch)
2022-04-25 00:21 PDT, chris fleizach
no flags
patch (7.33 KB, patch)
2022-04-25 00:29 PDT, chris fleizach
no flags
patch (7.33 KB, patch)
2022-04-25 01:00 PDT, chris fleizach
no flags
Radar WebKit Bug Importer
Comment 1 2017-07-07 03:13:28 PDT
James Craig
Comment 2 2017-07-07 04:09:22 PDT
It will be a few more than div and span, but that's good enough to start with... Perhaps, if an "isRoleDescriptionIgnored" method that checks is @role is null and tagName is div/span/br, etc. This taglist heuristic may be replaced by a "generic" role check in the future. https://github.com/w3c/aria/issues/525
James Craig
Comment 3 2022-04-21 19:05:21 PDT
James Craig
Comment 4 2022-04-21 19:06:39 PDT
aria-roledescription is only prohibited on elements matching the generic role like <div> and <span>. It’s NOT prohibited on elements that have an implicit ARIA role (like <table>) NOR is it prohibited on elements that don’t yet have an ARIA equivalent role, like <video>
chris fleizach
Comment 5 2022-04-21 22:46:39 PDT
chris fleizach
Comment 6 2022-04-22 13:52:33 PDT
chris fleizach
Comment 7 2022-04-25 00:15:50 PDT
chris fleizach
Comment 8 2022-04-25 00:21:55 PDT
chris fleizach
Comment 9 2022-04-25 00:29:27 PDT
chris fleizach
Comment 10 2022-04-25 01:00:09 PDT
EWS
Comment 11 2022-04-25 13:50:16 PDT
Committed r293345 (249963@main): <https://commits.webkit.org/249963@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458249 [details].
Note You need to log in before you can comment on or make changes to this bug.