Controlling focus with tabindex -- A11ycasts #04
Channel: Chrome for Developers
Date: 2016-09-02

Whenever possible you want to use native HTML elements for your custom controls. The button tag, for instance, is very easy to style, and has built-in keyboard support and semantics.

But there are times when you need to build something that doesn't have a corresponding native element. Sometimes you've just gotta build something new! In these cases it's important to remember to add in crucial keyboard support so all of your users can access your content.

The first step is to make sure that a user can actually focus your control. To accomplish this you can use the tabindex attribute. Today on the show we'll cover the various states of tabindex, when and how to use it, and point out one very important gotcha!

Watch all A11ycasts episodes: https://goo.gl/06qEUW

Subscribe to the Chrome Developers YouTube channel for updates on new episodes of A11ycasts: http://goo.gl/LLLNvf