Minor a11y improvements (suggestion).
-
These tips are things I have started using by default in everything I do, as they help a11y without disadvantaging anyone.
Pure CSS drop menus are great for organising content, but as usually employed they have two drawbacks. The first is that although they do not break keyboard navigation, they do hide drop menu content while the user cycles through all the anchors. This is not exactly ideal if you cannot use a mouse for some reason.
You can fix this with pure css. All it requires is setting a margin on the drop menu anchors on focus. If the ul holding them is set to left: -999em; off hover, then this will bring the anchor into view on focus:
a.whatever:focus {margin-left: 999em;}
I only found out about this recently and was kicking myself, as in retrospect it is so obvious that I should have thought of it. Example here: (try it with and without js enabled)
The second drawback is the lack of mouseout delay, which can be a problem for users who have slow reactions and/or less than perfect manual control. As you would know, that cannot be fixed with pure css and requires js. I think it is worth having, though. If you supply drop menu functionality then site admins will use it, and it can rapidly become annoying and difficult to use for some people. Giving menus a configurable mouseout delay really does make things a lot easier for these users.
IMO, the best all round system is a Superfish/hoverIntent combination with the added css tweaks that Blake Haswell uses. That covers all bases, as long as you change the hide function of Superfish so that it does not use visibility: hidden;
Using opacity: 0; is a better choice for the hide function as it means that the content will still be accessible to screen readers.
There you go. One canned opinion. ??
- The topic ‘Minor a11y improvements (suggestion).’ is closed to new replies.