I want to enable the user to tab through the links of a page.
This is the default behavior in most browsers, but as soon as the page contains an input
element, it becomes (depending on the browser) the only tabbable element on the page, making e.g. a
elements inaccessible by keyboard. This doesn't change if tabindex
is set or not.
See the following example. Focus the input element and press tab
a few times; While Chrome will focus the links, Firefox and Safari will skip those elements.
<div>
<form>
<input type="text" tabindex="0">
<button tabindex="0">send</button>
</form>
</div>
<a href="#" tabindex="0">Link</a>
<a href="#" tabindex="0">Link</a>
How can I achieve a cross-browser keyboard navigation without JavaScript and circumvent this problem?