ValueMeaning
negativeelement will be focusable, but it should not be reachable via sequential keyboard navigation
0element will be focusable and reachable through keyboard sequential navigation, but it’s relative order is
defined by the platform convention
positiveelement must be focusable and accessible via sequential keyboard navigation; it’s relative order will be
defined by the attribute value: the sequential follow the increasing number of the tabindex

Add an element to the tabbing order

<div tabindex="0">Some button</div>

Note: Try to use a native HTML button or an a tag where appropriate.

Remove an element from the tabbing order

<button tabindex="-1">This button will not be reachable by tab</button>

The element will be removed from the tabbing order but will still be focusable.

<div tabindex="2">Second</div>
<div tabindex="1">First</div>

Positive values will insert the element at the tabbing order position of its respective value. Elements without
preference (i.e. tabindex=”0″ or native elements such as button and a) will be appended after those with
preference.

Advertisement

Positive values are not recommended as they disrupt the expected behavior of tabbing and might confuse people
who rely on screenreaders. Try to create a natural order by rearranging your DOM structure.

Recent Posts

Securing phpMyAdmin Like a Pro: Essential Tips and Tricks

Securing phpMyAdmin is crucial to prevent unauthorized access and protect your databases. Here's a guide…

5 months ago

Pasqal raises $100M to build a neutral atom-based quantum computer

Pasqal, a Paris-based quantum computing startup, today announced that it has raised a $100 million…

1 year ago

Apple in talks with Disney, others on VR content for new headset: Report

Developed with Sony Group Corp, the headset will have two ultra-high-resolution displays to handle the…

1 year ago

Microsoft, Amazon results to highlight softening cloud business

After years of blistering growth, most recently fuelled by remote working and studying during the…

1 year ago

Intel chairman Omar Ishrak steps down

Omar Ishrak had stepped down and the chipmaker appointed board director Frank Yeary as his…

1 year ago

Canada to commercialise world's first photonic-based quantum computer

Canadian Prime Minister Justin Trudeau has announced a new federal investment to build and commercialise…

1 year ago