A test for focusing into a tablist

Expected behavior: with JAWS or NVDA running, navigate using virtual cursor or by heading elements. When encountering "The test, heading level 2" press the Tab key.

Focus should move to the "Banana" tab, as it has a tabindex=0 while the "Apple" tab has a tabindex=-1.

Actual behavior: keyboard focus is not set to "Banana" and is instead set to "Apple" even though it has a negative tabindex.

this a focusable element for testing.

The test

Just so you don't have to view source

You can check out the tablist code...

The code

		<div role="tablist">
		  <button tabindex="-1" role="tab">Apple</button>
		  <button tabindex="0" role="tab" aria-selected="true">Banana</button>
		  <button tabindex="-1" role="tab">Orange</button>