WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: thought experiment: automated testing and built-in keyboard controls


From: Chaals McCathie Nevile
Date: Aug 4, 2015 9:46PM

On Wed, 29 Jul 2015 11:03:06 -0400, < <EMAIL REMOVED> > wrote:

> I'm looking for some suggestions from the peanut gallery for this idea
> I've been spitballing. Developers like to add JavaScript keyboard
> shortcuts in webpages. JavaScript keyboard shortcuts can be big
> accessibility wins, of course -- but equally frequently, it seems, they
> cause conflicts with assistive technology. Even more importantly, the
> frequency with which they are meaningfully and visibly documented is
> rare. It's often quite difficult for users to find out keyboard
> shortcuts exist. YouTube keyboard shortcuts, for example, only seem to
> be documented on the screen reader help page, and they are documented
> *inaccurately*.

I've been thinking about this for a while. ;)

Like you, I think fixing accesskey is the direction we should be going in
to get the biggest win and smallest loss for the minimal cost. I hope to
deal with this problem in my draft proposal to do that:

In the meantime, I'm not sure - the more I think of it the more I see
using javascript to build shortcuts as a serious anti-pattern. Having
aria-kbdshortcut as part of that anti-pattern mitigates the documentation
problem. And importantly, the attributes are in the DOM - so it isn't only
screenreaders that can use them. It might be the least-worst way we can
approach this for now.

But it's got a lot of problems. Most notably, it might like the YouTube
case, not be true. For a feature that can readily override things users
rely on, that's a pretty minimal improvement - we've made it potentially
possible *if you get it right* to provide some information. Or, to mislead
users even further, if you missed something.

More complex is that Browsers, Operating Systems, and other user agents
can interfere with particular keystrokes or other behaviour, essentially
trapping it and preventing it from returning to the application. So unless
a developer knows what is being silently "stolen", s/he *cannot know*, and
therefore cannot accurately document what is going to happen.

As Mallory noted, different apps need different strategies for explaining
what is available. In some cases the three shortcuts can be part of the
overall UI, in others the three hundred should really come with a
context-based reminder being available…

…just some thinking aloud.



Charles McCathie Nevile - web standards - CTO Office, Yandex
<EMAIL REMOVED> - - - Find more at http://yandex.com