Accesskey standards

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
0 Access key details

So there’s a fair bit of overlap between sites. The use of numbers is sensible as software often uses letters for its own shortcuts, particularly for access to the command menu. Letters also make more sense when dealing with forms (think shortcuts in dialog boxes). So the main bone of contention appears to be skip nav. Here’s a few samples:

Skip Nav Shortcuts Across the Web
Shortcut Web Site
2 Dive Into Mark
2 Zeldman
2 WebAIM
9 Cinnamon Interactive
C Clagnut
C Accessify
S UK Government

The consensus of opinion from this little lot is ‘2’. I’ve made the change accordingly and added more keyboard shortcuts to other parts of the site – see the new accessibility statement. I’ve also made my DHTML site contents menu a bit more keyboard friendly by adding an onfocus event handler to display it.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值