Open
Bug 1946356
Opened 1 month ago
Add shared-head test helper to wrap one-off AccessibilityUtils.setEnv
Categories
(DevTools :: General, task)
DevTools
General
Tracking
(Not tracked)
NEW
People
(Reporter: nchevobbe, Unassigned)
Details
We're using the following pattern
AccessibilityUtils.setEnv({ mustHaveAccessibleRule: false });
element.click();
AccessibilityUtils.resetEnv();
to disable the accessibility check on a specific element (see https://searchfox.org/mozilla-release/search?q=AccessibilityUtils.setEnv&path=devtools%2F&case=false®exp=false)
We could probably have a helper to wrap those, e.g.
async function pushAccessibilityChecks(accessibilityUtilsEnvOptions, fn) {
AccessibilityUtils.setEnv(accessibilityUtilsEnvOptions);
await fn();
AccessibilityUtils.resetEnv();
}
(going with the push
prefix as we already have it for pushPref
so we have a similar pattern)
You need to log in
before you can comment on or make changes to this bug.
Description
•