FAC-11 / JAAM

One page team portfolio
https://fac-11.github.io/JAAM/
1 stars 0 forks source link

Accessibility: tabindex is used unnecessarily #39

Closed oliverjam closed 7 years ago

oliverjam commented 7 years ago

I realise the accessibility workshop may have confused this a bit (we had the same problem in FAC10!), but tabindex should only really be used when you absolutely need to control focus (usually when you're building your own components with JavaScript).

You have tabindex=0 on your contact form and the title within it, which means users have to tab through this non-interactive elements before they reach the inputs. Focus is supposed to indicate that the user can interact in some way with the element, which is why by default only interactive elements (like anchor tags, inputs and buttons) are focusable.

Generally the only times you actually need tabindex are to make something unfocusable by default (with tabindex=-1) until you want to focus is with JavaScrip (like a modal window). Otherwise it's best not to mess with the default focus order.

Here's an article with a bit more info: http://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html