Closed Bug 1864221 Opened 9 months ago Closed 8 months ago

Investigate if 2 tests for disabled browser actions in Webextensions need to be updated to pass a11y_checks

Categories

(WebExtensions :: Frontend, task, P3)

task

Tracking

(firefox121 fixed)

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: ayeddi, Assigned: ayeddi)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

There are 2 test files that include 4 tests which are failing Tier 2 a11y-checks, because the click events are sent to an inaccessible elements.

In these cases the tests are aiming to confirm that clicking on a disabled <toolbarbutton> won't do anything and no clicked event would be emitted. Thus, we should add setEnv to these clicks to signal to a11y-checks that we are expecting these clicks to fail, then re-enable these 2 files in the test manifest.

Failing cases are the following:

FAIL	browser/components/extensions/test/browser/browser_ext_browserAction_disabled.js	Node is enabled but disabled via the accessibility API	_afdfcbb6-9280-4990-99ed-890b387d6ee4_-BAP	toolbarbutton	unified-extensions-item-action-button toolbarbutton-1 panel-no-padding webextension-browser-action
FAIL	browser/components/extensions/test/browser/browser_ext_browserAction_disabled.js	Node is not focusable via the accessibility API	_afdfcbb6-9280-4990-99ed-890b387d6ee4_-BAP	toolbarbutton	unified-extensions-item-action-button panel-no-padding webextension-browser-action subviewbutton subviewbutton-iconic
FAIL	browser/components/extensions/test/browser/browser_ext_browserAction_disabled.js	Node is enabled but disabled via the accessibility API	_afdfcbb6-9280-4990-99ed-890b387d6ee4_-BAP	toolbarbutton	unified-extensions-item-action-button panel-no-padding webextension-browser-action subviewbutton subviewbutton-iconic
FAIL	browser/components/extensions/test/browser/browser_ext_browserAction_popup_preload.js	Node is enabled but disabled via the accessibility API	_2ede3b3d-5821-4f4d-b1e3-7c4cee52bc0e_-BAP	toolbarbutton	unified-extensions-item-action-button toolbarbutton-1 panel-no-padding webextension-browser-action

We intentionally turn off a11y_checks for these click events, because the clicks in the patch are targeting disabled controls to confirm the click events won't come through. These clicks are not meant to be interactive and are not expected to be accessible.

Thus, we are excluding this click event from accessibility checks and removing the fail-if annotation that was added by bug 1854460 before the investigation in the meta bug 1854461.

Another test case test_disabled_item should be included in the patch:

FAIL	browser/components/extensions/test/browser/browser_ext_menus_capture_secondary_click.js	Node is enabled but disabled via the accessibility API	_78f1afd6-9059-4e04-a114-6f8c35bbdb79_-menuitem-94	menuitem		"
(...)
chrome://mochitests/content/browser/browser/components/extensions/test/browser/browser_ext_menus_capture_secondary_click.js:test_disabled_item:121
See Also: → 1864576
Depends on: 1864577
Attachment #9363077 - Attachment description: WIP: Bug 1864221 - Disable a11y_check for two disabled toolbarbuttons in Webextensions → Bug 1864221 - Add exceptions from a11y_checks for two tests clicking on disabled toolbarbuttons in Webextensions. r=Jamie
Attachment #9363077 - Attachment description: Bug 1864221 - Add exceptions from a11y_checks for two tests clicking on disabled toolbarbuttons in Webextensions. r=Jamie → Bug 1864221 - Pt.1 Add exceptions from a11y_checks for 3 tests clicking on disabled controls in Webextensions. r=Jamie

There are 2 failing test cases in browser/components/extensions/test/browser/browser_ext_browserAction_popup_preload.js for the html:body that are sending clicks to a <body> element to dismiss the pending popup using an alternative way of the popup dismissal, where the other way like Esc key is available, therefore these two test clicks can be excluded from the a11y_checks.

Another test cases are in browser/components/extensions/test/browser/browser_ext_menus_capture_secondary_click.js that are clicking on the <menu> parent container to confirm the click event is not going to be triggered for the attached menu items, thus these clicks are also excluded from the a11y_checks.

These actions are not expected or do not have to be done by a user of an assistive technology and we do not have to confirm the accessibility of these elements.

Thus, we are excluding these click events from accessibility checks.

Depends on D193329

Pushed by ayeddi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6dd889413c9c
Pt.1 Add exceptions from a11y_checks for 3 tests clicking on disabled controls in Webextensions. r=Jamie,extension-reviewers,rpl
https://hg.mozilla.org/integration/autoland/rev/744da29ee918
Pt.2 Add exceptions from a11y_checks for 2 tests purposefully clicking on container elements in Webextensions. r=rpl
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
See Also: → 1886925
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: