Bug 231038

Summary: Web Inspector: Audit: testForLinkLabels Accessibility audit should ignore anchors if aria-hidden
Product: WebKit Reporter: bugmenot
Component: Web InspectorAssignee: Razvan Caliman <rcaliman>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, cfleizach, ews-watchlist, hi, inspector-bugzilla-changes, kevin_neal, pangle, rcaliman, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1.0 none

bugmenot
Reported 2021-09-30 14:14:05 PDT
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.
Attachments
Patch v1.0 (1.93 KB, patch)
2021-10-26 06:25 PDT, Razvan Caliman
no flags
Kevin Neal
Comment 1 2021-10-01 15:00:01 PDT
Thank you for filing. The appropriate engineers have been notified.
Radar WebKit Bug Importer
Comment 2 2021-10-01 15:00:14 PDT
Razvan Caliman
Comment 3 2021-10-26 06:25:17 PDT
Created attachment 442483 [details] Patch v1.0
Razvan Caliman
Comment 4 2021-10-26 06:29:03 PDT
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> ```
Patrick Angle
Comment 5 2021-10-26 08:33:05 PDT
Comment on attachment 442483 [details] Patch v1.0 Can we add a test case to `LayoutTests/inspector/audit/run-accessibility.html`?
Patrick Angle
Comment 6 2021-10-28 09:15:27 PDT
(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.
Blaze Burg
Comment 7 2021-10-28 09:24:31 PDT
Comment on attachment 442483 [details] Patch v1.0 rs=me
EWS
Comment 8 2021-10-28 09:28:10 PDT
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].
Note You need to log in before you can comment on or make changes to this bug.