Closed Bug 1869389 Opened 2 years ago Closed 2 years ago

Close button for the search mode in the URL bar is unlabeled

Categories

(Firefox :: Address Bar, defect)

defect

Tracking

()

VERIFIED FIXED
122 Branch
Accessibility Severity s2
Tracking Status
firefox122 --- verified
firefox123 --- verified

People

(Reporter: ayeddi, Assigned: ayeddi)

References

(Blocks 2 open bugs)

Details

(Keywords: access)

Attachments

(2 files)

The close button "X" of the search mode indicator urlbar-search-mode-indicator-close in the URL bar is missing an accessible name and context.

It should not only be announced as Close but also provide a context by referencing the search mode title text as well, so the "History" search would be announced as Close History mode or just Close History or similar.

This bug is flagged by the following test files that are failing a11y-checks:

  1. browser/components/urlbar/tests/browser/browser_placeholder.js
  2. browser/components/urlbar/tests/browser/browser_remove_match.js
  3. browser/components/urlbar/tests/browser/browser_searchMode_alias_replacement.js
  4. browser/components/urlbar/tests/browser/browser_searchMode_indicator_clickthrough.js - this test also has urlbar-input-container that is failing a11y-checks
  5. browser/components/urlbar/tests/browser/browser_searchMode_indicator.js
  6. browser/components/urlbar/tests/browser/browser_searchMode_oneOffButton.js
  7. browser/components/urlbar/tests/browser/browser_searchMode_preview.js
  8. browser/components/urlbar/tests/browser/browser_searchMode_suggestions.js
  9. browser/components/urlbar/tests/browser/browser_searchMode_switchTabs.js

When this bug is fixed, the tests mentioned above would need to have the temporary fail-if notations removed from their test manifest so the tests are expecting to pass (as they should)

Two example of the failure output that was reported:

Result	Error	El ID	El tagName	El className
FAIL	Interactive elements must be labeled	urlbar-search-mode-indicator-close	html:div	close-button
WARN	Unlabeled element removed before l10n finished	urlbar-search-mode-indicator-close	html:div	close-button -
Component: Search → Address Bar

Ensure the focusable and actionable control is also labeled, so an assistive technology user would know the purpose of this control. It should not only be announced as Close but also provide a context by referencing the search mode title text as well, so the "History" search would be announced as Close History mode or just Close History or similar.

Also, since there were a series of test cases failing the a11y-checks because of this unlabeled control, we remove the fail-if notations from their test manifests to allow for the accessibility tests to run and expect to pass, as they should be.

Depends on D195479

Assignee: nobody → ayeddi
Status: NEW → ASSIGNED
Pushed by ayeddi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7c61da498c57 Provide urlbar-search-mode-indicator-close button with an accessible name. r=Jamie,fluent-reviewers,adw,bolsson
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch

Reproducible on a 2023-12-11 Nightly build on macOS 12.
Verified as fixed on Firefox 122.0 and Nightly 123.0a1 on macOS 12, Windows 10, Ubuntu 22.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: