Bug 1894094 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 
1. Ensure an NVDA 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. Confirm the dialog is opened and observe the screen reader announcements:

### Expected:
1. The purpose of the dialog (its accessible name) is announced by a screen reader.

### Actual:
1. Only the dialog role itself is announced by screen readers, but the label for the dialog is missing. Users of assistive technology may be confused what is the purpose of the dialog and why did it open.

### Remediation:
1. Add to the `role=alertdialog` container an `aria-labelledby` reference to the `<h1>` ID attribute that would provide an accessible name - `Translations BETA` or `Translations`
### STR:
1. Ensure `browser.translations.select.enable` is set to `true` in the about:config 
1. Ensure an NVDA 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. Confirm the dialog is opened and observe the screen reader announcements:

### Expected:
1. The purpose of the dialog (its accessible name) is announced by a screen reader.

### Actual:
1. Only the dialog role itself is announced by screen readers, but the label for the dialog is missing. Users of assistive technology may be confused what is the purpose of the dialog and why did it open.

### Remediation:
1. Add to the `role=alertdialog` container an `aria-labelledby` reference to the `<h1>` ID attribute that would provide an accessible name - `Translations BETA` or `Translations`
1. To the dialog container, also add `aria-describedby` reference to the ID attribute of the dialog itself - this would allow a screen reader to also read the content of the dialog to a user while the focus is placed not at the top of the dialog, without the need to reverse navigate it.
### STR:
1. Ensure `browser.translations.select.enable` is set to `true` in the about:config 
1. Ensure an NVDA 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. Confirm the dialog is opened and observe the screen reader announcements:

### Expected:
1. The purpose of the dialog (its accessible name) is announced by a screen reader.

### Actual:
1. Only the dialog role itself is announced by screen readers, but the label for the dialog is missing. Users of assistive technology may be confused what is the purpose of the dialog and why did it open.

### Remediation:
1. Add to the `role=alertdialog` container an `aria-labelledby` reference to the `<h1>` ID attribute that would provide an accessible name - `Translations BETA` or `Translations`
1. (bug 1894098) To the dialog container, also add `aria-describedby` reference to the ID attribute of the dialog itself - this would allow a screen reader to also read the content of the dialog to a user while the focus is placed not at the top of the dialog, without the need to reverse navigate it.
### STR:
1. Ensure `browser.translations.select.enable` is set to `true` in the about:config 
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. Confirm the dialog is opened and observe the screen reader announcements:

### Expected:
1. The purpose of the dialog (its accessible name) is announced by a screen reader.

### Actual:
1. Only the dialog role itself is announced by screen readers, but the label for the dialog is missing. Users of assistive technology may be confused what is the purpose of the dialog and why did it open.

### Remediation:
1. Add to the `role=alertdialog` container an `aria-labelledby` reference to the `<h1>` ID attribute that would provide an accessible name - `Translations BETA` or `Translations`
1. (bug 1894098) To the dialog container, also add `aria-describedby` reference to the ID attribute of the dialog itself - this would allow a screen reader to also read the content of the dialog to a user while the focus is placed not at the top of the dialog, without the need to reverse navigate it.
### STR:
1. Ensure `browser.translations.select.enable` is set to `true` in the about:config 
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. Confirm the dialog is opened and observe the screen reader announcements:

### Expected:
1. The purpose of the dialog (its accessible name) is announced by a screen reader.

### Actual:
1. Only the dialog role itself is announced by screen readers, but the label for the dialog is missing. Users of assistive technology may be confused what is the purpose of the dialog and why did it open.

### Remediation:
1. Add to the `role=alertdialog` container an [aria-labelledby](https://w3c.github.io/aria/#aria-labelledby) reference to the `<h1>` ID attribute that would provide an accessible name - `Translations BETA` or `Translations`
1. (bug 1894098) To the dialog container, also add [aria-describedby](https://w3c.github.io/aria/#aria-describedby) reference to the ID attribute of the dialog itself - this would allow a screen reader to also read the content of the dialog to a user while the focus is placed not at the top of the dialog, without the need to reverse navigate it.
### STR:
1. Ensure `browser.translations.select.enable` is set to `true` in the about:config 
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. Confirm the dialog is opened and observe the screen reader announcements:

### Expected:
1. The purpose of the dialog (its accessible name) is announced by a screen reader.

### Actual:
1. Only the dialog role itself is announced by screen readers, but the label for the dialog is missing. Users of assistive technology may be confused what is the purpose of the dialog and why did it open.

### Remediation:
1. Add to the `role=alertdialog` container an [aria-labelledby](https://w3c.github.io/aria/#aria-labelledby) reference to the `<h1>` ID attribute that would provide an accessible name - `Translations BETA` or `Translations`
1. (bug 1894098) To the dialog container, also add [aria-describedby](https://w3c.github.io/aria/#aria-describedby) reference to the ID attribute of the dialog itself - this would allow a screen reader to also read the content of the dialog to a user while the focus is placed not at the top of the dialog, without the need to reverse navigate it.

Back to Bug 1894094 Comment 0