Accessibility fix for JAWS screen readers#5149
Conversation
rhansen
left a comment
There was a problem hiding this comment.
Thank you!
I pushed some minor fixes to your branch. If they look OK to you I'll squash them into your commit when I merge.
|
|
||
| if (document) { | ||
| result.node = document.createElement('div'); | ||
| // Set the ARIA role and label for JAWS compatibility. Do it here, because it is only needed and |
There was a problem hiding this comment.
This comment says "Set the ARIA role" but I don't see role set anywhere. Is that intentional?
There was a problem hiding this comment.
The comment points to the attribute 'aria-live'='assertive', you are right, it has nothing to do with the role. So the comment is not well-formed and may be changed to better understanding.
| result.node = document.createElement('div'); | ||
| // Set the ARIA role and label for JAWS compatibility. Do it here, because it is only needed and | ||
| // possible if we have a document and are working in a real browser context. | ||
| result.node.setAttribute('aria-live', 'assertive'); |
There was a problem hiding this comment.
Just to confirm: Is assertive the right value here? I'm not an ARIA expert, which is why I'm a bit concerned by MDN's strong language:
aria-live="assertive"should only be used for time-sensitive/critical notifications that absolutely require the user's immediate attention.
There was a problem hiding this comment.
It is the right value we choose, we tested it and found it as a required value to make JAWS and NVDA work correctly. Before we checked "role=textbox" and "ariaLabel=Line". It was working also, but testing it in the school environment turned out that "assertive" is the best choice.
I am also not a expert in ARIA, it was just checking what makes the screenreader work correctly, and this depends on how the screenreader deals with that values.
There was a problem hiding this comment.
The changes you have committed above are OK, thank you! So it is good to let them flow into the merge as you are ready to do it.
ace.js: removed the role 'application' from innerDocument.body. JAWS do not read any text from the edit lines if this role is set. domline.createDomLine: to give JAWS the ability to read the lines correctly, it is required to set the attribute 'aria-live' to 'assertive'.
7e276d7 to
84d6d27
Compare
|
Thank you, have a nice evening! |
Three accessibility fixes: ether#6581 (WCAG 2.1.2 keyboard trap): Escape key now moves focus from the editor to the first toolbar button, giving keyboard-only users an escape route. Added a screen-reader-only hint about Escape and Alt+F9. ether#7255 (screen reader access): Added role="textbox", aria-multiline="true", and aria-label="Pad content" to the contenteditable body so screen readers can identify and interact with the editor content. Fixed non-standard aria-role="document" to role="document" in pad.html. ether#5695 (aria-live character echo): Removed aria-live="assertive" from every line div in domline.ts. This was causing screen readers to announce every character typed, overriding users' keyboard echo settings. The attribute was added in PR ether#5149 for JAWS compatibility but aria-live on individual contenteditable lines is a misuse. Also added .sr-only CSS utility class for visually hidden content. Fixes ether#6581, ether#7255, ether#5695 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three accessibility fixes: ether#6581 (WCAG 2.1.2 keyboard trap): Escape key now moves focus from the editor to the first toolbar button, giving keyboard-only users an escape route. Added a screen-reader-only hint about Escape and Alt+F9. ether#7255 (screen reader access): Added role="textbox", aria-multiline="true", and aria-label="Pad content" to the contenteditable body so screen readers can identify and interact with the editor content. Fixed non-standard aria-role="document" to role="document" in pad.html. ether#5695 (aria-live character echo): Removed aria-live="assertive" from every line div in domline.ts. This was causing screen readers to announce every character typed, overriding users' keyboard echo settings. The attribute was added in PR ether#5149 for JAWS compatibility but aria-live on individual contenteditable lines is a misuse. Also added .sr-only CSS utility class for visually hidden content. Fixes ether#6581, ether#7255, ether#5695 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…7451) * fix: accessibility — keyboard trap, screen reader support, aria-live Three accessibility fixes: #6581 (WCAG 2.1.2 keyboard trap): Escape key now moves focus from the editor to the first toolbar button, giving keyboard-only users an escape route. Added a screen-reader-only hint about Escape and Alt+F9. #7255 (screen reader access): Added role="textbox", aria-multiline="true", and aria-label="Pad content" to the contenteditable body so screen readers can identify and interact with the editor content. Fixed non-standard aria-role="document" to role="document" in pad.html. #5695 (aria-live character echo): Removed aria-live="assertive" from every line div in domline.ts. This was causing screen readers to announce every character typed, overriding users' keyboard echo settings. The attribute was added in PR #5149 for JAWS compatibility but aria-live on individual contenteditable lines is a misuse. Also added .sr-only CSS utility class for visually hidden content. Fixes #6581, #7255, #5695 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: Escape closes gritters first, only exits editor if nothing to dismiss If gritter popups are visible, Escape closes them and keeps focus in the editor. Only when there are no popups does Escape move focus to the toolbar for keyboard trap escape. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: address Qodo review — keyboard hint in iframe, aria-readonly - Move keyboard hint (Escape/Alt+F9) inside the inner iframe with aria-describedby so screen readers announce it when focusing the editor. Previously it was on the outer editorcontainer which is a different document context. - Set aria-readonly on the editor body when in readonly mode so screen readers correctly convey editability state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ace.js: removed the role 'application' from innerDocument.body. JAWS do not read any text from the edit lines if this role is set.
domline.createDomLine: to give JAWS the ability to read the lines correctly, it is required to set the attribute 'aria-live' to 'assertive'.