aria-hidden="false" is unreliable for accessibility #4014
Labels
type/accessibility
Issues relating to accessibility (keyboard navigation, screenreaders, text contrast, etc.)
Milestone
Current Behavior
There's an
aria-hidden="false"
on the main #app div, where most of the page content is loaded. This doesn't work reliably in assistive technology - it's just as likely to be interpreted asaria-hidden="true"
asaria-hidden="false"
, so in spite of your consideration, some screen reader users (or voice input users, who also rely on the accessibility tree) still may not be able to see or interact with the main content at all 😅Steps to Reproduce
<div id="app" aria-hidden="false">
Expected Behavior
no potential for unreliability!
Screenshots
No response
Environment
Output of
php flarum info
Possible Solution
The best way to treat
aria-hidden
is as if it were a boolean attribute instead, so when it's true, it says<div id="app" aria-hidden="true">
, and when it's false it just says<div id="app">
.I'm not yet confident enough with Flarum to try submitting a pull request, but I'm hoping this is a simple enough fix that I'll be able to use it as a starter demonstration if someone is able to pick it up!
Additional Context
See the second warning note on the ARIA 2.1 spec for the
aria-hidden
state here (copied below): https://www.w3.org/TR/wai-aria-1.2/#aria-hiddenThe text was updated successfully, but these errors were encountered: