现在的位置: 首页 > 综合 > 正文

Accesskey standards

2013年09月26日 ⁄ 综合 ⁄ 共 1608字 ⁄ 字号 评论关闭

One of my goals for Clagnut is to make it accessible beyond good alttags and valid
code
. It currently passes WCAG 1.0 Priority
1 and Section 508
. To achieve this, a skip
navigation
 link (skip
nav
) is required. To make skip nav (and other essential navigation) more effective, we should provide keyboard shortcuts through the accesskey attribute.
For example:

<a
href="#content" accesskey="2">skip nav</a>

This allows visitors to press ALT+2 or CTRL+2 (on
Windows and Macs respectively) to move focus straight to the anchor in question. Keyboard shortcuts can also be applied to form controls by adding accesskeyattributes
to input tags
in the same way.

It’s also helpful to add keyboard shortcuts for other important parts of the site, such as search, help, home page and the page which lists the keyboard shortcuts. It struck me that there should be consistency in access keys across the Web. I couldn’t find
any mention of standards or suggestions on theSection
508
 or WAI sites,
so I attempted to see if a de facto standard has been adopted none-the-less.

The UK Government
provides accessibility
guidelines
 to which all its websites should comply. These guidelines state:

UK Government
Shortcuts
Access key Target
S Skip navigation
1 Home page
2 What’s new
3 Site map
4 Search
5 FAQs
6 Help
7 Complaints procedure
8 Terms and conditions
9 Feedback form
0 Access key details

WebAIM provides
similar shortcuts:

WebAIM Shortcuts
Access key Target
1 Home page
2 Skip navigation
3 Printer-friendly version
4 Search

These almost match with the access
keys used by Mark Pilgrim
 (accessibility evangelist):

Dive Into Mark Shortcuts
Access key Target
1 Home page
2 Skip navigation
4 Search
0 Access key details

And finally, the accessibility magazine Made
For All
 uses a few different shortcuts:

Made For All Shortcuts
Access key Target
1 Home page
2 News
3 Previous issues
4 Resources
5 About

抱歉!评论已关闭.