You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the keyboard to navigate the items inside a Combobox, the highlighted item is briefly focussed followed by the input field being focussed:
// ComboboxRoot.vueonInputNavigation: async(val)=>{
...
// Option is briefly focussedfocusOnSelectedElement()// Focus is returned to input fieldnextTick(()=>inputElement.value?.focus({preventScroll: true}))},
The explanation in focusOnSelectedElement reads:
// Find the highlighted element and focus// This helps the screen readers to read the selected value
I am not well-versed in screen-readers, but is this really necessary? I would assume, that aria-selected would serve this purpose. I briefly tested this using the MacOS VoiceOver utility, and here it made no difference, but maybe there are screen-readers which need the focus to occur?
The issue caused by this is simply excessive blur/focus events on the input field, which is not a huge deal, but it would be nice to fix it nonetheless.
Expected behavior
Blur/focus events are not triggered when navigating the list.
Context & Screenshots (if applicable)
No response
The text was updated successfully, but these errors were encountered:
Yo @JarvisH . Thanks for the issue.
Yeah we need to have focusOnSelectedElement behaving as such due to certain browser not behave as expected with aria-activedescendant.
Will close this issue for now as it doesn't really incur bug for the user 😁
Environment
Link to minimal reproduction
https://stackblitz.com/edit/jkiw2fdl?file=src%2FApp.vue
Steps to reproduce
Add focus/blur events to ComboboxInput
Describe the bug
When using the keyboard to navigate the items inside a Combobox, the highlighted item is briefly focussed followed by the input field being focussed:
The explanation in
focusOnSelectedElement
reads:I am not well-versed in screen-readers, but is this really necessary? I would assume, that
aria-selected
would serve this purpose. I briefly tested this using the MacOS VoiceOver utility, and here it made no difference, but maybe there are screen-readers which need the focus to occur?The issue caused by this is simply excessive blur/focus events on the input field, which is not a huge deal, but it would be nice to fix it nonetheless.
Expected behavior
Blur/focus events are not triggered when navigating the list.
Context & Screenshots (if applicable)
No response
The text was updated successfully, but these errors were encountered: