Chapter 09 Labels
Keyboard key
A key to press, on the native kbd element, so screen readers and search engines know it is a key. For a shortcut write one key per element, with the joining + as plain text.
import { KbdComponent } from '@okaapi-ui/angular';A shortcut
Press Ctrl + K to search.
<p>Press <kbd ui-kbd>Ctrl</kbd> + <kbd ui-kbd>K</kbd> to search.</p>In Arabic
Key names stay as printed on the keyboard.
اضغط Esc للإغلاق.
<p>اضغط <kbd ui-kbd>Esc</kbd> للإغلاق.</p>When to use something else
| If you need | Use |
|---|---|
| Code or a value the reader types, such as a coupon | A plain code element |
| A short label for a status | Badge |
Inputs
| Name | Type | Default | What it does |
|---|---|---|---|
kbd[ui-kbd] | selector | — | On a native kbd element. The key name is its content. |
Keyboard and screen readers
- The native kbd element, so screen readers and search engines know it is a key.