Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Accessibility Issue - aria-hidden attribute on Off-Canvas wrap. #108

Closed
manwithacat opened this issue Sep 2, 2014 · 4 comments
Closed

Comments

@manwithacat
Copy link
Contributor

In header.php the aria-hidden attribute on the off-canvas-wrap is set to true. The effect of this is that screen readers (particularly JAWS) return a message that the document is empty.

<div class="off-canvas-wrap" data-offcanvas aria-hidden="true">

Changing it to false solves the problem.

<div class="off-canvas-wrap" data-offcanvas aria-hidden="false">

@olefredrik
Copy link
Owner

Hi James

From the Foundation Docs:

The off-canvas menu is not yet fully accessible. Because it's tucked away off-screen but not totally hidden, the user's browser will still tab through each item, and screen readers will read each item in the navigation. However, the off-canvas menu will not appear when focused with the keyboard.

If your page has two primary navigation menus, perhaps a horizontal one for larger screens and an off-canvas menu for small screens, it's best to hide one so screen readers won't read through two whole navigation menus. Add the attribute aria-hidden="true" to the container of one navigation, which will tell assistive devices to skip it entirely.

I see your point, and I guess I have missed something on the way. Perhaps it would be a good idea to move the aria-hidden="true" attribute from the off-canvas-wrap class to the left-off-canvas-menu class?

@manwithacat
Copy link
Contributor Author

I was going to do a pull request, but honestly I'm not too sure what the right approach is. I think it would make sense to put aria-hidden="true" on the <aside> containing the off-canvas menu because screen readers would be triggering the large layout and thus not requiring knowledge of the off-canvas links. Maybe.

@olefredrik
Copy link
Owner

Then I think we agree. Removing the aria-hidden="true" attribute on the off-canvas-wrap and putting it on the <aside> containing the off-canvas makes sense. Well spotted, thumbs up! If you submit a pull request, I would be more than happy to merge it. Cheers

@olefredrik
Copy link
Owner

Thanks! #109

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants