bkardell / common-panel

An effort to define a new element with clear semantics and separation
14 stars 3 forks source link

improper tab handling in custom element #37

Open bkardell opened 9 years ago

bkardell commented 9 years ago

in the custom element version of the prototype, when a panel header has focus and the user presses the tab key it advances the focus to the next tab, in the directive version it moves to the panel content (arrow keys move between tabs) - I am pretty sure that the directive version is correct

LJWatson commented 9 years ago

Yes, the directive version is correct. The collection of tabs should only represent a single tab stop (with the currently selected tab set to tabindex="0", and the rest to tabindex="-1"). Pressing the tab key whilst focus is on a tab, should result in keyboard focus moving to the tabpanel/panel content.