Closed Bug 1871491 Opened 1 year ago Closed 1 year ago

Add a check for combobox container of moz-input-box and options within the URL bar autocomplete list in AccessibilityUtils

Categories

(Firefox :: Search, task, P3)

task

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: ayeddi, Assigned: ayeddi)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Add an additional check similar to the isKeyboardFocusableBrowserToolbarButton check that could pass the assertLabelled rule for following URL Bar-specific controls, since these controls are either left unlabeled or are being labeled after the Fluent l10n is completed deliberately:

  1. Combobox container of the Search Input with id moz-input-box - we intentionally leave this element unlabeled, because its child is a search input (properly labeled) that is the target and main control of this component and we want to avoid duplication in the label announcement when a user focuses the input. This causes an a11y failure Interactive elements must be labeled: id: , tagName: moz-input-box, className: urlbar-input-box
  2. Options within an autocomplete listbox with class urlbarView-row-inner - we know each of these option is accessible, but it disappears as soon as it is clicked and the a11y-checks do not have time to test the label, because the Fluent localization is not yet completed by then. This causes an a11y warning Unlabeled element removed before l10n finished
  3. [To be confirmed] Additional Searchbar with id searchbar that triggers Interactive elements must be labeled failure
Summary: Add a check for keyboard focusable URL bar buttons in AccessibilityUtils → Add a check for combobox container of moz-input-box and options within the URL bar autocomplete list in AccessibilityUtils

Adding an additional check similar to the isKeyboardFocusableBrowserToolbarButton check that could pass the assertLabelled rule for following URL Bar-specific controls, since these controls are either left unlabeled or are being labeled after the Fluent l10n is completed deliberately:

  1. Combobox container of the Search Input with id moz-input-box - we intentionally leave this element unlabeled, because its child is a search input (properly labeled) that is the target and main control of this component and we want to avoid duplication in the label announcement when a user focuses the input. This causes an a11y failure Interactive elements must be labeled: id: , tagName: moz-input-box, className: urlbar-input-box
  2. Options within an autocomplete listbox with class urlbarView-row-inner - we know each of these option is accessible, but it disappears as soon as it is clicked and the a11y-checks do not have time to test the label, because the Fluent localization is not yet completed by then. This causes an a11y warning Unlabeled element removed before l10n finished
  3. [To be confirmed] Additional Searchbar with id searchbar that triggers Interactive elements must be labeled failure

Since the browser/components/urlbar/tests/browser/browser_view_selectionByMouse.js and two other tests will be passing the a11y_checks without warnings now, we are updating appropriate test manifests to remove fail-if conditions as well.

Confirmed that the <searchbar id="searchbar"> that has 9 test a11y_checks failures is using the same pattern as the moz-input-box: it is a combobox with a search input.

This searchbar could be added next to the URL Bar via about:preferences > Search > Search Bar > select Add search bar in toolbar

This would allow the following tests to have the fail-if notation removed and to expect them to pass a11y_checks:

  1. browser/components/enterprisepolicies/tests/browser/browser_policy_search_engine.js
  2. browser/components/search/test/browser/browser_hiddenOneOffs_diacritics.js
  3. browser/components/search/test/browser/browser_oneOffContextMenu_setDefault.js
  4. browser/components/search/test/browser/browser_oneOffContextMenu.js
  5. browser/components/search/test/browser/browser_searchbar_addEngine.js - one other item would be still failing the a11y_checks ATM
  6. browser/components/search/test/browser/browser_searchbar_openpopup.js
  7. browser/components/search/test/browser/browser_searchbar_smallpanel_keyboard_navigation.js
  8. toolkit/components/passwordmgr/test/browser/browser_doorhanger_submit_telemetry.js - one other item would be still failing the a11y_checks ATM
Blocks: 1854534
See Also: → 1854533, 1854660
See Also: → 1871510
Blocks: 1854452
Blocks: 1854453
No longer blocks: 1854452
See Also: → 1854452
Pushed by ayeddi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ac7e380f9581 Add a check for combobox container of moz-input-box and options within the URL bar autocomplete list in AccessibilityUtils. r=Jamie,search-reviewers,credential-management-reviewers,sgalich,Standard8
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
Regressions: 1872899
No longer blocks: 1854453
Blocks: 1876146
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: