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

[label] Examples for keyboard shortcuts using code element #358

Closed
jamessampford opened this issue Aug 5, 2022 · 3 comments
Closed

[label] Examples for keyboard shortcuts using code element #358

jamessampford opened this issue Aug 5, 2022 · 3 comments
Milestone

Comments

@jamessampford
Copy link
Contributor

A common feature within online systems may be to list keyboard shortcuts (available to use by javascript) or may want to show a field name in a block of code to stand out a little

The below has a couple of examples that could be included when using the <code> element with labels:

https://jsfiddle.net/b6nhok7m/2/

[I do wonder if the font should be changed as O looks a similar to how 0 looks albeit 0 has the line going through it, also wonder if maybe the padding should be equal]

@lubber-de
Copy link
Member

The correct HTML element for such usage is the kbd element instead of code. However the visual result is the same
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd

@jamessampford
Copy link
Contributor Author

Interesting, wasn't aware there was an HTML element for it. The MDN example looks nice, though doesn't quite fit the FUI look 😝

@lubber-de
Copy link
Member

Added by #465

@lubber-de lubber-de added this to the 2.9.3 milestone May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants