The ARIA spec is updating with a new requirement where user agents must ignore the aria-hidden=true attribute when used on the HTML or BODY element of a web page. The specific text: To prevent authors erroneously hiding entire window-rendered documents only to those using assistive technology, user agents MUST NOT expose the hidden state to assistive technologies if it is specified on the root element or the host language element that represents the contents of the primary document in view. For instance, the html or body elements in an HTML document, or the root svg element if it is rendered as its own primary document in the browser window. If authors were to specify aria-hidden="true" on the opening tag for an embedded document, for instance on a math or svg embedded within an HTML document, user agents would still be expected to hide these elements from assistive technologies. A basic test case, such as, would result in no ignored elements, as the aria-hidden=true on the html element would be ignored. <html lang=en aria-hidden=true> <h1>hello world</h1> <p>my content</p> <a href=#>a hyperlink</a> </html> ARIA PR 1880 - https://github.com/w3c/aria/pull/1880
<rdar://problem/123049663>
Created attachment 470908 [details] Patch
Comment on attachment 470908 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=470908&action=review > Source/WebCore/accessibility/AccessibilityObject.cpp:3995 > + if (tag == bodyTag || tag == htmlTag || (tag == SVGNames::svgTag && !element->parentNode())) Is frame and iframe still ok to hide?
Pull request: https://github.com/WebKit/WebKit/pull/27294
Sending through EWS as a PR so that we can avoid the patch application bug plaguing GTK and WPE ports, for the moment.
Passed GTK and WPE tests in https://github.com/WebKit/WebKit/pull/27294, landing!
Created attachment 470965 [details] Patch
(In reply to chris fleizach from comment #4) > Comment on attachment 470908 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=470908&action=review > > > Source/WebCore/accessibility/AccessibilityObject.cpp:3995 > > + if (tag == bodyTag || tag == htmlTag || (tag == SVGNames::svgTag && !element->parentNode())) > > Is frame and iframe still ok to hide? It's possible we'll want to apply this heuristic to iframe and frame, but that would require more exploration (Are developers making this mistake on these elements too? Are there more legitimate use cases for aria-hidden on frame / iframe than body / html / root SVGs?)
Committed 277677@main (873f5404e780): <https://commits.webkit.org/277677@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 470965 [details].