mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Add rule about tabindex > 0 to the styleguide (#12981)
This commit is contained in:
parent
7d08c68875
commit
2043cf0e0a
1 changed files with 7 additions and 1 deletions
|
@ -125,4 +125,10 @@ If something is meant to be clickable, favor using a `button` or `a` tag before
|
|||
### Use `tabindex` to make elements tabbable
|
||||
|
||||
When added to the tab order, elements become focusable via non-sticky-mode keyboard navigation.
|
||||
To add an element to the tab order, you must add an `id` attribute as well as a `tabindex` attribute. If you don't know which number to use for the tab index, or if you simply want to add it to the general flow of the document, use `tabindex="0"`.
|
||||
To add an element to the tab order, you must add an `id` attribute as well as a `tabindex` attribute.
|
||||
|
||||
You should only use `tabindex="0"` to add an element to the tab flow or `tabindex="-1"` to remove an
|
||||
otherwise focusable element from the focus flow (use with care).
|
||||
You should never use a value greater than 0, since tabindex is a global counter for the whole
|
||||
webpage and not scoped to parent elements, so you would need to manage a globally meaningful order
|
||||
across all elements in the whole source code.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue