Fix problems with Braille output devices #1396
Open
+142
−23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes problems identified with using a Braille output device in JAWS and NVDA on Windows. It turns out that for the
aria-braillelabelto be read in JAWS, therolebeingapplicationdoesn't work, whilerole="img"does. But we need the speech element to be in an element withrole="application"in order to remain in focus mode, so this PR wraps the speech node in an additionalmjx-speech-containerelement withrole="application"and makes the speech node haverole="img".Not all screen readers handle the
aria-braillelabelattribute, however (e.g., NVDA), but if Braille is in thearia-label, they will pass it on to the Braille device. So we have added a menu option to include the Braille as part of the speech string. This lists the Braille first, followed by 40 blank Braille cells, followed by the speech string. The brail device should show the braille, but the speech will be off the right-hand edge and will not be displayed, but it will be spoken. In NVDA the Braille itself is not spoken (but in JAWS and some other readers it is, so this can't be the default setting).We also add an option to replace the speech with the Braille, but that item is hidden and only kept as a backup in case it is needed.
Finally, we set the
aria-braillroledescriptionto try to override theimgrole description, for those screen readers that process it.