Browse Source
The popup keeps focus in the input and walks its rows with an active-descendant key manager, which only knows about options. A section header written as a span with role="button" and tabindex="0" is therefore unreachable: the arrow keys skip it, its keyup.enter can never fire because it can never hold focus, and Tab does not help since leaving the input closes the panel. That header is the only way from the popup into a type page, so without a mouse there was no way in at all. The footer had the same shape, though its action is also on the input's own Enter. The header also sat inside the group's label element, which is presentational, so the section's name came out as the header's whole text - "Devices +12 more" - wrapping a control nobody could operate. Header and footer are now options like every other row. They take part in arrow navigation, they read as part of the list, and the group wrapper goes away with the label it was distorting. Rows also acted on (click) alone. Pressing Enter on a highlighted result runs _selectViaInteraction, which is not a DOM click, so the card never opened from the keyboard. Every row now acts on (onSelectionChange) guarded by isUserInput, one path for pointer and keyboard both. Enter in the field needed a guard to go with that: the trigger acts on keydown and this handler runs on keyup, which the trigger's preventDefault does not stop, so one Enter would have opened a result and then navigated away from it.pull/16148/head
3 changed files with 75 additions and 76 deletions
Loading…
Reference in new issue