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.
<rdar://problem/33178050>
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
Also SVG https://github.com/w3c/svg-aam/issues/21
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>
Created attachment 458115 [details] patch
Created attachment 458171 [details] patch
Created attachment 458246 [details] patch
Created attachment 458247 [details] patch
Created attachment 458248 [details] patch
Created attachment 458249 [details] patch
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].