Bug 1871192 - [devtools] Add an exception from a11y_checks for a test purposefully clicking on a body element. r=ochameau,devtools-reviewers

This test is failing accessibility checks, because it sends a click on an empty `<body>` element in-context and this event is not expected to activate any control or interact with any other interacrive element, therefore this test click can be excluded from the a11y_checks.

Differential Revision: https://phabricator.services.mozilla.com/D197198
This commit is contained in:
Anna Yeddi 2023-12-22 21:05:57 +00:00
Родитель 8af4c57baf
Коммит 660b2bfb8d
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -453,11 +453,18 @@ add_task(async function testTracingOnNextInteraction() {
"The tracer did not log the function call before trigerring the click event"
);
// We intentionally turn off this a11y check, because the following click
// is send on an empty <body> to to test the click event tracer performance,
// and not to activate any control, therefore this check can be ignored.
AccessibilityUtils.setEnv({
mustHaveAccessibleRule: false,
});
await BrowserTestUtils.synthesizeMouseAtCenter(
"body",
{},
gBrowser.selectedBrowser
);
AccessibilityUtils.resetEnv();
await hasConsoleMessage(dbg, "λ onmousedown");
await hasConsoleMessage(dbg, "λ onclick");