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

Clarification for nested kbd elements #10160

Open
j9t opened this issue Feb 26, 2024 · 0 comments
Open

Clarification for nested kbd elements #10160

j9t opened this issue Feb 26, 2024 · 0 comments
Labels
clarification Standard could be clearer

Comments

@j9t
Copy link
Contributor

j9t commented Feb 26, 2024

What is the issue with the HTML Standard?

For nested kbd elements, the spec says “When the kbd element is nested inside another kbd element, it represents an actual key or other single unit of input as appropriate for the input mechanism.”

First, how is “an actual key” to be understood? With nested kbd elements we seem to usually deal with two or more keys, but this phrasing (“an”) suggests it could only cover one key. In that case, however, it seems like one kbd element would suffice. [Had applied this to the parent kbd element, but on re-reading this is clear for child kbd elements.]

Then, can you clarify how “anonymous” content as part of multiple kbd elements is to be understood exactly? I.e., what does “bar” in <kbd><kbd>foo</kbd> bar <kbd>baz</kbd></kbd> stand for, if anything?

The spec example suggests it should be read as a conjunction, because the only example using nesting works with a “+”. But that doesn’t seem to be the only possible read, especially since in the wild, authors join keyboard combinations by natural language (“press ‘Ctrl’ and ‘Alt’ and ‘Del’”, “hit ‘space’ or ‘enter’ to continue”, “press ‘1‘ then ‘2’ then ‘3’”, but also “‘shift’ → ‘space’”). How are these cases to be read? What markup do they warrant?

Thanks for clarifying!

@zcorpan zcorpan added the clarification Standard could be clearer label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

No branches or pull requests

2 participants