Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Add note about proper usage of tabindex with skip links #635

Closed
thierryk opened this issue Oct 23, 2016 · 4 comments · Fixed by #636
Closed

Add note about proper usage of tabindex with skip links #635

thierryk opened this issue Oct 23, 2016 · 4 comments · Fixed by #636

Comments

@thierryk
Copy link

The warning in section 5.4.3 by @patrickhlauke is a great addition but I think the following sentence needs to be seriously emphasized:

However, authors should only make elements focusable if they act as interactive controls or widgets.

or may be followed by something like:

Authors must use tabindex="-1" onto elements that need to receive focus but are not meant to be part of the sequential focus navigation (i.e. the target of a skip link).

I think this is important to mention because it seems many people do not make the difference between "being focusable" and "being keyboard accessible"—assuming that to be focusable, an element has to be part of the tab sequence.

These 2 skip link examples demonstrate the issue:

@patrickhlauke
Copy link
Member

I was going to say that this may be unnecessary, as it's mentioned explicitly later on in the same section...but then realised that the note about tabindex="0" that was originally in that warning boxout is also just reiterating/reinforcing what's said later on too. So yes, might as well add a further paragraph to the warning as well.

@patrickhlauke
Copy link
Member

I mostly used your excellent initial suggestion there in my proposal, with one major difference: I changed the "must" to "should"

@thierryk
Copy link
Author

Yeah—I went back and forth—"must" is a big word.

As a side note, I think the following may also confuse people:

The tabIndex IDL attribute must reflect the value of the tabindex content attribute. Its default value is 0 for elements that are focusable and -1 for elements that are not focusable.

I think in people's mind, this translates to: tabindex="-1" is for elements that are not focusable

@patrickhlauke
Copy link
Member

@thierryk good stuff #637

travisleithead pushed a commit that referenced this issue Oct 25, 2016
As the concepts get a bit convoluted (once you realise that
tabindex="-1" also means "focusable", but not part of the sequential
focus navigation order), this is a fairly crude initial attempt at
disambiguating this (as per
#635 (comment) comment)
arronei pushed a commit to arronei/html that referenced this issue Apr 17, 2017
As the concepts get a bit convoluted (once you realise that
tabindex="-1" also means "focusable", but not part of the sequential
focus navigation order), this is a fairly crude initial attempt at
disambiguating this (as per
w3c#635 (comment) comment)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants