Search control tabbing behavior
Closed this issue · 2 comments
lederer commented
We should make sure the search control behaves as follows.
- When collapsed:
- Tabbing into the search control expands it and focuses on the search
input
field.
- Tabbing into the search control expands it and focuses on the search
- When expanded:
- Tabbing (or shift-tabbing) from the empty search
input
field collapses the search control and moves focus to the next (or previous) element in the DOM after (or before) the search control. - Tabbing (or shift-tabbing) from the non-empty search
input
field keeps the search control expanded and moves focus to the searchbutton
(or the previous element in the DOM before the search control). - Tabbing (or shift-tabbing) from the search
button
keeps the search control expanded and moves focus to the next (or previous) element in the DOM. (Note this assumes the searchinput
field is non-empty, since focus shouldn't be able to reach the searchbutton
while the searchinput
is empty.
- Tabbing (or shift-tabbing) from the empty search
kellyi commented
lederer commented
Good catch. I think you're right. Those elements should get tabindex="-1"
while obscured by the expanded search control. The user will need to clear the search field (and blur it) to reenable them.