edenspiekermann/a11y-toggle

aria-hidden="true" and media queries

RyanRoberts opened this issue · 1 comments

I'm planning to use a11y-toggle as a fairly standard (hamburger) navigation toggler.

So far it works as per the examples but I've run into a problem when displaying the navigation at large screen sizes and hiding the button. Of course, aria-hidden="true" is set on the navigation so it's hidden from AT user despite being visible to everyone else.

Is a configurable media query option out of the question? I'm guessing I'd have to detect the screen size and switch around aria-hidden="true" (plus deal with the button visibility).

Apologies for not suggesting a solution, my Javascript experience is very limited.

Is a configurable media query option out of the question? I'm guessing I'd have to detect the screen size and switch around aria-hidden="true" (plus deal with the button visibility).

I think this would be the way to go. :)