New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: significantly improve ARIA support #1065
Conversation
Added description above noting the changes. @halindrome, please to review. Please let know if you want to make changes... we should merge core/aria with w3c/aria. It seems people might benefit in general from the w3c/aria stuff, as it's not W3C specific, AFAICT. |
33f6364
to
0644d29
Compare
The above should say "DOM ordering is now correct for tabbing". |
@@ -0,0 +1,7 @@ | |||
import { sub } from "core/pubsubhub"; | |||
|
|||
document.body.setAttribute("aria-busy", "true"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think this should be aria-hidden. Some browsers do not allow the entire webview area to be marked as busy. We could try aria-hidden. Alternately, we could wrap the entire content in a div and then mark that div as busy / hidden.
0644d29
to
9e33025
Compare
9e33025
to
071f59e
Compare
Merging for now. We can use this as a base to improve on... at least it's not as bad as it was |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit introduces accessibility problems by adding aria-live="polite"
to every code sample in a spec.
} | ||
const msg = { | ||
action: "highlight", | ||
code: element.textContent, | ||
id: Math.random().toString(), | ||
languages: getLanguageHint(element.classList), | ||
}; | ||
|
||
element.setAttribute("aria-live", "polite"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This presents a significant accessibility problem for screen reader users trying to read a spec containing a lot of code examples, because every code sample is sent to the the screen reader buffer to announce at its earliest convenience. I've sometimes been unable to test a page with VoiceOver with a W3C spec open in another tab, because all I hear are source code examples from the spec being announced.
It's far from perfect, but it's hopefully a huge improvement.