Describe the enhancement or change
Following the update that added arrow key handling on menus, we should refactor the logic for when an item is autofocused upon opening via the shouldfocusFirstItemOnOpen prop. Currently it will focus only the first valid item in the menu, but we should tweak it so that:
- If an item is selected (aria-selected, possibly also if an item with a checkbox is checked), focus should be set on that item (or the first item that matches if multiple are selected).
- Otherwise focus the first valid item in the menu.
Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?
Any other information?