Bug 1894271 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

### STR:
1. Ensure `browser.translations.select.enable` is set to `true` in the about:config 
    * to trigger errors intermittently, activate the Chaos mode via: `browser.translations.chaos.errors=true` and then setting `browser.translations.chaos.timeoutMS` to `1000` (1 sec) or similar
1. Ensure a screen reader is running
1. Navigate to a page in a language different from the OS, i.e. for English machine: `data:text/html,<p lang="es_ES">Como estas?</p>` or https://ru.wikipedia.org/wiki/%D0%A2%D0%B5%D0%BE%D1%80%D0%B8%D1%8F_%D0%BB%D0%BE%D0%B6%D0%B5%D0%BA
1. Select a text (using mouse, likely, because screen readers are not yet supporting static text selection) and open a context menu/right click
1. Navigate to and activate `Translate Selection to English`
1. When a Translation panel opens _with an error_, observe the screen reader announcement
    * If the error state is not shown after 1 sec (or other timeout that was set in the custom pref), re-open the panel by pressing `Esc` and repeating steps 4-6.

### Expected:
1. The text of error is announced by a screen reader. 

### Actual:
1. The text of error is added to the panel but it is not announced by the assistive technology. The focus is set to the `Try again` button by default but it is not clear why it should be tried again. Users of screen readers would not be aware of the error, unless they'll navigate backwards in [browse mode of a screen reader](https://www.accessibility-developer-guide.com/knowledge/screen-readers/desktop/browse-focus-modes/).

### Remediation:
1. Either add `tabindex="-1"` to the error container and place the focus on it by default, _or_
1. Add [aria-describedby](https://w3c.github.io/aria/#aria-describedby) attribute to the `Try again` button and reference the `id` of the error container, i.e. `aria-describedby="select-translations-panel-translation-failure-message-bar"`. More than one `id` could be referenced when separated with a space
### STR:
1. Ensure `browser.translations.select.enable` is set to `true` in the about:config 
    * to trigger errors intermittently, activate the Chaos mode via: `browser.translations.chaos.errors=true` and then setting `browser.translations.chaos.timeoutMS` to `1000` (1 sec) or similar
1. Ensure a screen reader is running
1. Navigate to a page in a language different from the OS, i.e. for English machine: `data:text/html,<p lang="es_ES">Como estas?</p>` or https://ru.wikipedia.org/wiki/%D0%A2%D0%B5%D0%BE%D1%80%D0%B8%D1%8F_%D0%BB%D0%BE%D0%B6%D0%B5%D0%BA
1. Select a text (using mouse or by following the [NVDA 2024.1 guide for Native Selection Mode](https://www.nvaccess.org/files/nvda/documentation/userGuide.html?#NativeSelectionMode)) and open a context menu/right click
1. Navigate to and activate `Translate Selection to English`
1. When a Translation panel opens _with an error_, observe the screen reader announcement
    * If the error state is not shown after 1 sec (or other timeout that was set in the custom pref), re-open the panel by pressing `Esc` and repeating steps 4-6.

### Expected:
1. The text of error is announced by a screen reader. 

### Actual:
1. The text of error is added to the panel but it is not announced by the assistive technology. The focus is set to the `Try again` button by default but it is not clear why it should be tried again. Users of screen readers would not be aware of the error, unless they'll navigate backwards in [browse mode of a screen reader](https://www.accessibility-developer-guide.com/knowledge/screen-readers/desktop/browse-focus-modes/).

### Remediation:
1. Either add `tabindex="-1"` to the error container and place the focus on it by default, _or_
1. Add [aria-describedby](https://w3c.github.io/aria/#aria-describedby) attribute to the `Try again` button and reference the `id` of the error container, i.e. `aria-describedby="select-translations-panel-translation-failure-message-bar"`. More than one `id` could be referenced when separated with a space

Back to Bug 1894271 Comment 0