Bug 174248 - AX: Don't expose aria-roledescription value on "generic" elements (e.g. div and span) unless explicit role value is also defined
Summary: AX: Don't expose aria-roledescription value on "generic" elements (e.g. div a...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: chris fleizach
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-07-07 03:13 PDT by Joanmarie Diggs
Modified: 2022-04-25 13:50 PDT (History)
9 users (show)

See Also:


Attachments
patch (6.10 KB, patch)
2022-04-21 22:46 PDT, chris fleizach
andresg_22: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
patch (6.75 KB, patch)
2022-04-22 13:52 PDT, chris fleizach
andresg_22: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
patch (7.36 KB, patch)
2022-04-25 00:15 PDT, chris fleizach
no flags Details | Formatted Diff | Diff
patch (7.33 KB, patch)
2022-04-25 00:21 PDT, chris fleizach
no flags Details | Formatted Diff | Diff
patch (7.33 KB, patch)
2022-04-25 00:29 PDT, chris fleizach
no flags Details | Formatted Diff | Diff
patch (7.33 KB, patch)
2022-04-25 01:00 PDT, chris fleizach
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 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.
Comment 1 Radar WebKit Bug Importer 2017-07-07 03:13:28 PDT
<rdar://problem/33178050>
Comment 2 James Craig 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
Comment 3 James Craig 2022-04-21 19:05:21 PDT
Also SVG
https://github.com/w3c/svg-aam/issues/21
Comment 4 James Craig 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>
Comment 5 chris fleizach 2022-04-21 22:46:39 PDT
Created attachment 458115 [details]
patch
Comment 6 chris fleizach 2022-04-22 13:52:33 PDT
Created attachment 458171 [details]
patch
Comment 7 chris fleizach 2022-04-25 00:15:50 PDT
Created attachment 458246 [details]
patch
Comment 8 chris fleizach 2022-04-25 00:21:55 PDT
Created attachment 458247 [details]
patch
Comment 9 chris fleizach 2022-04-25 00:29:27 PDT
Created attachment 458248 [details]
patch
Comment 10 chris fleizach 2022-04-25 01:00:09 PDT
Created attachment 458249 [details]
patch
Comment 11 EWS 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].