Currently, the Accessibility audit "testForLinkLabels" applies to anchors even if aria-hidden="true". This makes little sense, since a aria-label has no effect if the element is aria-hidden. Steps to Reproduce 1. Create an HTML file with an anchor that has the aria-hidden attribute set to "true", e.g. <a aria-hidden="true" tabindex="-1" href="#">foobar</a> 2. Run the Audit Expected Result testForLinkLabels passes. Actual Result testForLinkLabels fails.
Thank you for filing. The appropriate engineers have been notified.
<rdar://problem/83783868>
Created attachment 442483 [details] Patch v1.0
If the link has text content, it will be used as the label. A better test case is to skip the text completely: ``` <a aria-hidden="true" tabindex="-1" href="#"></a> ```
Comment on attachment 442483 [details] Patch v1.0 Can we add a test case to `LayoutTests/inspector/audit/run-accessibility.html`?
(In reply to Patrick Angle from comment #5) > Comment on attachment 442483 [details] > Patch v1.0 > > Can we add a test case to > `LayoutTests/inspector/audit/run-accessibility.html`? Discussed with Razvan offline; I was incorrect - these tests test the special WebInspectorAudit.Accessibility functions, not the audits themselves.
Comment on attachment 442483 [details] Patch v1.0 rs=me
Committed r284986 (243633@main): <https://commits.webkit.org/243633@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442483 [details].