Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit a9138ad

Browse files
committed
Bug 1844062 - [devtools] Properly handle aria-pressed attribute on selector highlighter icon. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D189916
1 parent cfcaf0a commit a9138ad

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

devtools/client/inspector/rules/rules.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,9 @@ CssRuleView.prototype = {
483483

484484
const query = `.js-toggle-selector-highlighter[data-computed-selector='${selector}']`;
485485
for (const node of this.styleDocument.querySelectorAll(query)) {
486-
node.classList.toggle(
487-
"highlighted",
488-
eventName == "highlighter-shown"
489-
);
486+
const isHighlighterDisplayed = eventName == "highlighter-shown";
487+
node.classList.toggle("highlighted", isHighlighterDisplayed);
488+
node.setAttribute("aria-pressed", isHighlighterDisplayed);
490489
}
491490
}
492491
break;

0 commit comments

Comments
 (0)