Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the use of printable character from accessKey attribute. #158

Closed
stevenatkin opened this issue May 24, 2016 · 10 comments
Closed

Remove the use of printable character from accessKey attribute. #158

stevenatkin opened this issue May 24, 2016 · 10 comments
Labels
close? The related issue was closed by the Group but open here needs-resolution i18n expects this item to be resolved to their satisfaction. s:html https://html.spec.whatwg.org/multipage/ wg:webplatform https://www.w3.org/groups/wg/webplatform

Comments

@stevenatkin
Copy link

stevenatkin commented May 24, 2016

§ w3c/html#485

5.5.2 The accessKey attribute
http://www.w3.org/TR/html51/editing.html#the-accesskey-attribute

The accessKey attribute is now defined to be a single Unicode code point with it being a single printable character. We should remove the use of single printable character as there are many Unicode code point sequences that result in a single printable character. If the specification wants the accessKey to be limited to a single Unicode code point, then we should just say that. My guess is that what they really want to say is that the character must have the Unicode printable property.

@stevenatkin stevenatkin added pending Issue not yet sent to WG, or raised by tracker tool & needing labels. s:html https://html.spec.whatwg.org/multipage/ labels May 24, 2016
@r12a
Copy link
Contributor

r12a commented May 24, 2016

I suspect that what they mean is a character that has a visible shape when printed, ie. not a space or other invisible character.

@stevenatkin
Copy link
Author

If specified, the value must be a single grapheme: a string that contains a sequence of graphical Unicode code points. Typically, this sequence will contain a single Unicode code point, but there may be cases where multiple code points are needed to generate the single grapheme.

@stevenatkin
Copy link
Author

Here is my suggested updated text and example:

If specified, the value must be a single grapheme: a string that contains a sequence of Unicode code points. Typically, this sequence will contain a single Unicode code point, but there may be cases where multiple code points are needed to generate the single grapheme. For example, on the Hindi INSCRIPT keyboard layout on Windows the TRA key (on number 6) when pressed generates the following Unicode code point sequence: U+0924 (TA) + U+094D (Virama) + U+0930 (RA).

@r12a
Copy link
Contributor

r12a commented Jun 10, 2016

Steve, i've been pondering. I suppose the first question in my mind is why do they want to restrict to a single character at all? Do you have an idea? Perhaps that's the first question. I could see that it's useful general advice for authors to choose simple key events, but this seems to suggest that there's a practical reason that it must be one character only, but that reason doesn't seem to be evident.

Your para above starts out by saying 'must' in the first sentence, but then offers an alternative, which won't fly. It should say 'should' in the first sentence.

@aphillips
Copy link
Contributor

The reason to restrict to a "single character" is not for presentation but because the accessKey is the mnemonic keystroke used for keyboard shortcuts/keyboard access to form fields. It has to be visible in order to show it to the end user and typable as a single keystroke (non-composing). These are, however, usage requirements, not necessarily a technical restriction that Validator can/should check for.

In teleconference we had extensive discussion of what keys are present in single-press configurations on keyboards for various languages. The limitations here really are split between those that HTML can impose on the format ("validatable") and practicality for page authors ("typable").

The surrounding text in the section already makes this clear.

So I'd suggest, given that this is supposed to be a keystroke, maybe something slightly different:

If specified, the value must consist of a string representing an available keystroke. For most languages, this will be a single printable Unicode code point.

@stevenatkin
Copy link
Author

I am not really sure what their real motivation is for limiting the input to a single Unicode code point. My guess is that they just want to make this a simple mechanism for inputting key accelerators. I am ok with the suggested text:

If specified, the value must consist of a string representing an available keystroke. For most languages, this will be a single printable Unicode code point.

I will give them the Hindi example as justification for why we are uncomfortable with their single Unicode code point restriction. Let me know what you think.

@r12a
Copy link
Contributor

r12a commented Jun 10, 2016

sounds good. Btw i was just chatting with Addison, and he and i are saying the same thing here. Addison is probably saying a little better than i did. I like his proposed text.

@stevenatkin stevenatkin removed the pending Issue not yet sent to WG, or raised by tracker tool & needing labels. label Jun 13, 2016
@r12a r12a added the needs-resolution i18n expects this item to be resolved to their satisfaction. label Nov 16, 2018
@himorin
Copy link
Contributor

himorin commented Jul 6, 2019

whatwg/html 6.5.2 The accesskey attribute states as "one code point in length":

If specified, the value must be an ordered set of unique space-separated tokens that are case-sensitive, each of which must be exactly one code point in length.

discussion in this issue need to be considered for issue/proposal for whatwg/html.

@r12a
Copy link
Contributor

r12a commented Jul 11, 2019

I propose we close this tracker (issue already closed) in favour of issues being prepared for the WhatWG spec.

@r12a r12a added the close? The related issue was closed by the Group but open here label Jul 11, 2019
@r12a
Copy link
Contributor

r12a commented Jul 11, 2019

Agreed to close during telecon.

@r12a r12a closed this as completed Jul 11, 2019
@w3cbot w3cbot added the wg:webplatform https://www.w3.org/groups/wg/webplatform label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
close? The related issue was closed by the Group but open here needs-resolution i18n expects this item to be resolved to their satisfaction. s:html https://html.spec.whatwg.org/multipage/ wg:webplatform https://www.w3.org/groups/wg/webplatform
Projects
None yet
Development

No branches or pull requests

5 participants