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

Accesskey must be one character #168

Merged
merged 3 commits into from
Apr 8, 2016
Merged

Accesskey must be one character #168

merged 3 commits into from
Apr 8, 2016

Conversation

chaals
Copy link
Collaborator

@chaals chaals commented Apr 7, 2016

fix #20

Anything else (such as using multiple values, as suggested in HTML5)
means that except in Internet Explorer, there is no accesskey
assigned at all.

See tests at http://chaals.github.io/accesskey/tests/index.html

fix #20

Anything else (such as using multiple values, as suggested in HTML5)
means that except in Internet Explorer, there is no `accesskey`
assigned at all.
If specified, the value must be an <a>ordered set of unique space-separated tokens</a>
that are <a>case-sensitive</a>, each of which must be exactly one Unicode code point in
length.
If specified, the value must be a single printable character: a string exactly one Unicode code point in length.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: can there be whitespace around the character? Do we need to handle trimming of whitespace when processing the attribute?

@chaals
Copy link
Collaborator Author

chaals commented Apr 7, 2016

Test: https://chaals.github.io/accesskey/tests/accesskey-latin-with-spaces-manual.html

Most browsers fail if they find the character surrounded by spaces :(

It's a good idea as a browser to trim whitespace, but authors shouldn't put it there or their shortcuts will disappear.

@chaals
Copy link
Collaborator Author

chaals commented Apr 7, 2016

Hmm. I can make this clearer - hold on a bit.

Adjust the algorithm to allow what IE really does, since that's better
than other browsers.
@chaals
Copy link
Collaborator Author

chaals commented Apr 7, 2016

This should do a better job of reflecting reality. (Oh, wait…)

Some advice to improve likely compatibility with reality.
@chaals
Copy link
Collaborator Author

chaals commented Apr 7, 2016

Yeah, now should be good enough for standards work. It's at least a substantial improvement on what used to be there, in matching reality - and no longer says IE's extra-good behaviour is wrong.

@travisleithead
Copy link
Member

OK. We can continue to refine in subsequent commits if necessary.

@travisleithead travisleithead merged commit 67581f7 into w3c:master Apr 8, 2016
W3C-HTML-Bot pushed a commit that referenced this pull request Apr 8, 2016
@chaals chaals deleted the acesskey-that-works-issue-20 branch April 9, 2016 00:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authors should not use multiple values for accesskey
2 participants