What fresh hell is THIS now? - Patrick Lauke
aria-required
anywhere I can use required
in HTML5. The ARIA spec only allows aria-required
on certain roles (for example it allows on textbox
but not on checkbox
whereas required
is allowed on any INPUT
element.
<input type="checkbox" aria-required="true">
[tylersticka] Question!
I have a menu toggle. The structure of the menu is kinda like this (super simplified):
<a href="#menu">Menu</a> <nav id="menu"> Awesome Menu Contents! </nav>
When JS is disabled, the toggle is still functional by virtue of a :target
pseudo-class. But when JS is enabled, the menu is "enhanced" with animation and some other bells and whistles that make it easier to use.
But this is a responsive thing... at large sizes, the menu control is hidden, and the nav is always visible.
So my questions are:
• Is it helpful to add aria-expanded/aria-hidden/etc.? Or will the hash-target relationship likely suffice?
• If so, should I then be listening to the browser's resize
event and managing aria-hidden
and aria-expanded
accordingly when shifts from the small-screen, toggle experience to the large-screen, always-visible one?