Skip to content

Commit 4949550

Browse files
committed
Bug 1872954 - [Protections Panel] Ensure blocker tracker milestones subviewbutton is labeled. r=anti-tracking-reviewers,pbz
The Protections doorhanger UI includes [a subview button with id `protections-popup-milestones-content`](https://searchfox.org/mozilla-central/rev/762f24e00a9548d80ebba1b985c871ba6d9b829d/browser/components/controlcenter/content/protectionsPanel.inc.xhtml#160-167) that does not provide an accessible name, It appears to happen because this `<toolbarbutton>` XUL control is marked up with [`<description>` as its child containing the on-screen text](https://searchfox.org/mozilla-central/rev/762f24e00a9548d80ebba1b985c871ba6d9b829d/browser/components/controlcenter/content/protectionsPanel.inc.xhtml#164-165), while `<label>` does provide an expected output for the Accessibility API preserving its visual appearance at the same time. Since this control would become labeled and would start passing a11y_checks, we are also removing [the `fail-if` notation](https://searchfox.org/mozilla-central/rev/762f24e00a9548d80ebba1b985c871ba6d9b829d/browser/base/content/test/protectionsUI/browser.toml#57) from the `browser/base/content/test/protectionsUI/browser_protectionsUI_milestones.js` test manifest. Note: the following prefs are needed: ``` // Hide protections cards so as not to trigger more async messaging // when landing on the page. ["browser.contentblocking.report.monitor.enabled", false], ["browser.contentblocking.report.lockwise.enabled", false], ["browser.contentblocking.report.proxy.enabled", false], ["browser.contentblocking.cfr-milestone.update-interval", 0], ``` Differential Revision: https://phabricator.services.mozilla.com/D197634
1 parent 31430a1 commit 4949550

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

browser/base/content/test/protectionsUI/browser.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ skip-if = ["a11y_checks"] # Bugs 1858041 and 1849179 for causing intermittent cr
5454
https_first_disabled = true
5555

5656
["browser_protectionsUI_milestones.js"]
57-
fail-if = ["a11y_checks"] # Bug 1854233 protections-popup-milestones-content may not be labeled
5857

5958
["browser_protectionsUI_open_preferences.js"]
6059
https_first_disabled = true

browser/components/controlcenter/content/protectionsPanel.inc.xhtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@
161161
class="subviewbutton"
162162
flex="1"
163163
oncommand="gProtectionsHandler.openProtections(true); gProtectionsHandler.recordClick('milestone_message');">
164-
<description id="protections-popup-milestones-text" flex="1"
165-
role="heading" aria-level="2"/>
164+
<label id="protections-popup-milestones-text" flex="1"
165+
role="heading" aria-level="2"/>
166166
<image id="protections-popup-milestones-illustration"/>
167167
</toolbarbutton>
168168
</hbox>

0 commit comments

Comments
 (0)