Closed Bug 1890089 Opened 1 year ago Closed 1 year ago

Perma a11y [tier 2] browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js | single tracking bug

Categories

(Firefox :: Translations, defect, P3)

defect

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox124 --- unaffected
firefox125 --- unaffected
firefox126 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: ayeddi)

References

(Regression)

Details

(Keywords: intermittent-failure, intermittent-testcase, regression)

Attachments

(1 file)

Filed by: csabou [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=453724118&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/LK8jUeJMRoKiqtqGW3H8ew/runs/0/artifacts/public/logs/live_backing.log


[task 2024-04-06T03:09:50.205Z] 03:09:50     INFO - TEST-PASS | browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js | Expected select-translations-panel-from selection to match 'es' - 
[task 2024-04-06T03:09:50.206Z] 03:09:50     INFO - TEST-PASS | browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js | Expected select-translations-panel-to selection to match 'en' - 
[task 2024-04-06T03:09:50.207Z] 03:09:50     INFO - Buffered messages finished
[task 2024-04-06T03:09:50.211Z] 03:09:50     INFO - TEST-UNEXPECTED-FAIL | browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js | Interactive elements must be labeled: id: select-translations-panel-from, tagName: menulist, className:  - 
[task 2024-04-06T03:09:50.211Z] 03:09:50     INFO - Stack trace:
[task 2024-04-06T03:09:50.211Z] 03:09:50     INFO - chrome://mochikit/content/browser-test.js:test_ok:1592
[task 2024-04-06T03:09:50.211Z] 03:09:50     INFO - chrome://mochikit/content/tests/SimpleTest/AccessibilityUtils.js:a11yFail:752
[task 2024-04-06T03:09:50.213Z] 03:09:50     INFO - chrome://mochikit/content/tests/SimpleTest/AccessibilityUtils.js:assertLabelled:966
[task 2024-04-06T03:09:50.213Z] 03:09:50     INFO - chrome://mochikit/content/tests/SimpleTest/AccessibilityUtils.js:assertCanBeClicked:1173
[task 2024-04-06T03:09:50.214Z] 03:09:50     INFO - chrome://mochikit/content/tests/SimpleTest/AccessibilityUtils.js:runIfA11YChecks/this.AccessibilityUtils:1137
[task 2024-04-06T03:09:50.214Z] 03:09:50     INFO - chrome://mochikit/content/tests/SimpleTest/AccessibilityUtils.js:handleEvent:1254
[task 2024-04-06T03:09:50.214Z] 03:09:50     INFO - chrome://mochitests/content/browser/toolkit/components/translations/tests/browser/shared-head.js:click:975
[task 2024-04-06T03:09:50.214Z] 03:09:50     INFO - chrome://mochitests/content/browser/browser/components/translations/tests/browser/head.js:#changeSelectedLanguageViaDropdownMenu/<:1998
[task 2024-04-06T03:09:50.215Z] 03:09:50     INFO - chrome://mochitests/content/browser/browser/components/translations/tests/browser/head.js:_waitForPopupEvent:395
[task 2024-04-06T03:09:50.215Z] 03:09:50     INFO - chrome://mochitests/content/browser/browser/components/translations/tests/browser/head.js:waitForPanelPopupEvent:2109
[task 2024-04-06T03:09:50.215Z] 03:09:50     INFO - chrome://mochitests/content/browser/browser/components/translations/tests/browser/head.js:#changeSelectedLanguageViaDropdownMenu:1996
[task 2024-04-06T03:09:50.216Z] 03:09:50     INFO - chrome://mochitests/content/browser/browser/components/translations/tests/browser/head.js:changeSelectedFromLanguage:1903
[task 2024-04-06T03:09:50.216Z] 03:09:50     INFO - chrome://mochitests/content/browser/browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js:test_select_translations_panel_retranslate_on_change_from_language_via_popup:27
[task 2024-04-06T03:09:50.216Z] 03:09:50     INFO - chrome://mochikit/content/browser-test.js:handleTask:1139
[task 2024-04-06T03:09:50.216Z] 03:09:50     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1211
[task 2024-04-06T03:09:50.216Z] 03:09:50     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1353
[task 2024-04-06T03:09:50.217Z] 03:09:50     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1128
[task 2024-04-06T03:09:50.217Z] 03:09:50     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2024-04-06T03:09:50.218Z] 03:09:50     INFO - Waiting for the select-translations-panel popupshown event
[task 2024-04-06T03:09:50.219Z] 03:09:50     INFO - Waiting for the select-translations-panel popuphidden event
[task 2024-04-06T03:09:50.220Z] 03:09:50     INFO - GECKO(30047) | console.log: Translations: "Starting translation" 193273528321
[task 2024-04-06T03:09:50.221Z] 03:09:50     INFO - GECKO(30047) | console.log: Translations: "Starting translation" 193273528321
[task 2024-04-06T03:09:50.222Z] 03:09:50     INFO - Console message: [JavaScript Warning: "Element.releaseCapture() is deprecated. Use Element.releasePointerCapture() instead. For more help https://developer.mozilla.org/docs/Web/API/Element/releasePointerCapture" {file: "chrome://global/content/elements/menupopup.js" line: 168}]
[task 2024-04-06T03:09:50.223Z] 03:09:50     INFO - TEST-PASS | browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js | The textarea should have the translating class. - 
[task 2024-04-06T03:09:50.224Z] 03:09:50     INFO - TEST-PASS | browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js | Expected panel elements to have property betaIcon - 
[task 2024-04-06T03:09:50.226Z] 03:09:50     INFO - TEST-PASS | browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js | Expected panel elements to have property copyButton - 
[task 2024-04-06T03:09:50.227Z] 03:09:50     INFO - GECKO(30047) | console.log: Translations: "Creating a new engine for \"uk\" to \"en\"."
Severity: S4 → --
Priority: P5 → --

:nordzilla, since you are the author of the regressor, bug 1870316, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(enordin)

Set release status flags based on info from the regressing bug 1870316

Anna, could you help me understand what exactly is going on here?

To me, it looks like the logs say the test is passing, and I also don't understand how this is a "regression" since this patch is all-new code.

Whatever the issue is, I'd like to fix it, but I don't think I'm understanding what is wrong.

Flags: needinfo?(enordin) → needinfo?(ayeddi)

The AccessibilityUtils are reporting that the <menulist> does not have an accessible name. In this case, it seems that the visual label is placed next to the element, but its <label> element is not connected programmatically with the combobox: the id attribute of the <label> is not the same as the aria-labelledby value from the <menulist> in both language's cases - so the menulist is looking for some element that does not exist in the DOM, thus remaining unlabeled.

Correcting the aria-labelledby values for both menulists fixes the a11y issue and leaves a11y-checks happy.

Assignee: nobody → ayeddi
Status: NEW → ASSIGNED

(In reply to Erik Nordin [:nordzilla] from comment #3)

Anna, could you help me understand what exactly is going on here?

To me, it looks like the logs say the test is passing, and I also don't understand how this is a "regression" since this patch is all-new code.

Whatever the issue is, I'd like to fix it, but I don't think I'm understanding what is wrong.

Hi Erik, thank you for the ping!

Per the log: TEST-UNEXPECTED-FAIL | browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js | Interactive elements must be labeled: id: select-translations-panel-from, tagName: menulist, className: - (starting at line 4, I'm not sure why a11y-checks are auto-reported from a few lines above the actual fail) and stack trace for which a11y-check is failing after which click from which test function is below that.

The AccessibilityUtils are reporting that the <menulist> does not have an accessible name. In this case, it seems that the visual label is placed next to the element, but its <label> element is not connected programmatically with the combobox: the id attribute of the <label> is not the same as the aria-labelledby value from the <menulist> in both language's cases - so the menulist is looking for some element that does not exist in the DOM, thus remaining unlabeled.

Correcting the aria-labelledby values for both menulists fixes the a11y issue and leaves a11y-checks happy. Since I'm already at the selectTranslationsPanel markup file, I'll send the patch for your review.

In general, you could always run a11y-checks locally with ./mach test --enable-a11y-checks FILE (details) - in most cases, if the a11y issue is real (aka not AccessibilityUtils missing something) it would affect all OSes and would fail locally too. Then, I'd just dump()/console.log() the DOMNode/node from whichever method falls to debug.

I am not sure why something is being or not being marked up as regression - this is something that code sheriffs would know about.

(In reply to Anna Yeddi [:ayeddi] from comment #6)

(In reply to Erik Nordin [:nordzilla] from comment #3)

Anna, could you help me understand what exactly is going on here?

To me, it looks like the logs say the test is passing, and I also don't understand how this is a "regression" since this patch is all-new code.

Whatever the issue is, I'd like to fix it, but I don't think I'm understanding what is wrong.

Hi Erik, thank you for the ping!

Per the log: TEST-UNEXPECTED-FAIL | browser/components/translations/tests/browser/browser_translations_select_panel_retranslate_on_change_language_from_dropdown_menu.js | Interactive elements must be labeled: id: select-translations-panel-from, tagName: menulist, className: - (starting at line 4, I'm not sure why a11y-checks are auto-reported from a few lines above the actual fail) and stack trace for which a11y-check is failing after which click from which test function is below that.

The AccessibilityUtils are reporting that the <menulist> does not have an accessible name. In this case, it seems that the visual label is placed next to the element, but its <label> element is not connected programmatically with the combobox: the id attribute of the <label> is not the same as the aria-labelledby value from the <menulist> in both language's cases - so the menulist is looking for some element that does not exist in the DOM, thus remaining unlabeled.

Correcting the aria-labelledby values for both menulists fixes the a11y issue and leaves a11y-checks happy. Since I'm already at the selectTranslationsPanel markup file, I'll send the patch for your review.

In general, you could always run a11y-checks locally with ./mach test --enable-a11y-checks FILE (details) - in most cases, if the a11y issue is real (aka not AccessibilityUtils missing something) it would affect all OSes and would fail locally too. Then, I'd just dump()/console.log() the DOMNode/node from whichever method falls to debug.

I am not sure why something is being or not being marked up as regression - this is something that code sheriffs would know about.

adding an NI for you for visibility ;)

Flags: needinfo?(ayeddi) → needinfo?(enordin)
Severity: -- → S3
Flags: needinfo?(enordin)
Priority: -- → P3

Thank you for the awesome explanations here, and even for throwing up a patch.

I really appreciate it!

Pushed by enordin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0440aeced025 Fixing aria-labelledby references for menulists on the select translations panel. r=nordzilla,translations-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: