Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/static/js/ace.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ const Ace2Editor = function () {
// <body> tag
innerDocument.body.id = 'innerdocbody';
innerDocument.body.classList.add('innerdocbody');
innerDocument.body.setAttribute('role', 'application');
innerDocument.body.setAttribute('spellcheck', 'false');
innerDocument.body.appendChild(innerDocument.createTextNode('\u00A0')); // &nbsp;

Expand Down
2 changes: 2 additions & 0 deletions src/static/js/domline.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ domline.createDomLine = (nonEmpty, doesWrap, optBrowser, optDocument) => {

if (document) {
result.node = document.createElement('div');
// JAWS and NVDA screen reader compatibility. Only needed if in a real browser.
result.node.setAttribute('aria-live', 'assertive');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

} else {
result.node = {
innerHTML: '',
Expand Down