The rules view stylesheet link puts its click handler on a div with no role
Categories
(DevTools :: Inspector: Rules, defect)
Tracking
(Not tracked)
People
(Reporter: florian, Assigned: florian)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
In devtools/client/inspector/rules/views/rule-editor.js the click handler that opens the Style Editor sits on div.ruleview-rule-source rather than on the a.ruleview-rule-source-label it wraps. The div has no role and gets no accessible, so a click dispatched at it fails a11y_checks. The shared helper getRuleViewLinkByIndex hands every annotated test that div.
Moving the handler onto the anchor puts it on the element that already carries the role, name and focusability. One trap for later: the anchor is a link only because href is always set, sometimes to the string "undefined". Tidying that away without giving the element another interactive role puts these annotations straight back.
This retires the fail-if on browser_rules_original-source-link.js, browser_rules_original-source-link2.js, browser_rules_style-editor-link.js and browser_dbg-telemetry-stylesheets.js. The last also fails on the debugger's source tree, so it needs Bug 2070909 to land first.
| Assignee | ||
Comment 1•2 days ago
|
||
The handler was on the wrapper div rather than the anchor it wraps, so
getRuleViewLinkByIndex handed tests a click target with no accessible,
which is what the Bug 1849028 annotations absorbed. Moving it makes the
handler and the click target coincide; the helper now returns the anchor
and the six unannotated tests that reached through it follow.
browser_dbg-telemetry-stylesheets.js also fails on the debugger's source
tree, so its annotation only retires once Bug 2070909 has landed.
Updated•2 days ago
|
Description
•