Skip to content

Commit

Permalink
Bug 1844062 - [devtools] Properly handle aria-pressed attribute on se…
Browse files Browse the repository at this point in the history
…lector highlighter icon. r=devtools-reviewers,ochameau.

Differential Revision: https://phabricator.services.mozilla.com/D189916

UltraBlame original commit: 6a3696d25b3eb37571c0cb68fc067a89c26b845a
  • Loading branch information
marco-c committed Oct 13, 2023
1 parent bd60c44 commit 866140c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions devtools/client/inspector/rules/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,9 @@ CssRuleView.prototype = {

const query = `.js-toggle-selector-highlighter[data-computed-selector='${selector}']`;
for (const node of this.styleDocument.querySelectorAll(query)) {
node.classList.toggle(
"highlighted",
eventName == "highlighter-shown"
);
const isHighlighterDisplayed = eventName == "highlighter-shown";
node.classList.toggle("highlighted", isHighlighterDisplayed);
node.setAttribute("aria-pressed", isHighlighterDisplayed);
}
}
break;
Expand Down

0 comments on commit 866140c

Please sign in to comment.