idoros / zeejs

Layering in HTML
MIT License
7 stars 0 forks source link

Tabbing between separate radio groups with the same name #19

Closed idoros closed 4 years ago

idoros commented 4 years ago

When tabbing and the next element is an enabled <input type="radio" name="group-id">:

This works as expected, however when there are multiple groups with the same name under different <form> elements, they should be considered as separate groups.

The case:

<form>
  <input type="radio" name="groupA" value="a" ></input>
  <input type="radio" name="groupA" value="b" checked></input>
</form>          
<form>
  <button><!-- focused button --></button>
  <input type="radio" name="groupA" value="c" ></input>
  <input type="radio" name="groupA" value="d" ></input>
</form>

Currently tabbing from the button in the second form will move the focus to <input value="b"> instead of the expected focus of <input value="c">.

This is inherited caveat from Tabbable.