- From: Isaiah Thomason <notifications@github.com>
- Date: Sun, 14 Sep 2025 15:51:10 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <WICG/webcomponents/issues/762/3289994814@github.com>
ITenthusiasm left a comment (WICG/webcomponents#762) @alice I'm not sure if it's related to the spec or if it's related to browser/platform behavior, but I'm writing a [Combobox Web Component](https://github.com/ITenthusiasm/custom-element-discoveries/tree/main/src/Combobox) and using [`[tabindex="-1"]`](https://github.com/ITenthusiasm/custom-element-discoveries/blob/main/src/Combobox/ComboboxListbox.js#L23-L26) to prevent the controlled `listbox` from getting focused. For some reason, browsers were focusing the `listbox` when I tried to tab _past_ my `combobox` while it was expanded. I did not want this behavior. :sweat_smile: I'm using `aria-activedescendant` so that I can avoid all of the headaches (and extra JS Logic) that come with focus management. Consequently, my `combobox` assumes that once it's, `blur`red it's safe to collapse. This assumption is broken when browsers try to focus the `listbox` instead of the next focusable element. Hence, I'm using `-1` for the `tabindex`. (Unfortunately, VoiceOver somehow still manages to force focus onto the element. I would love if this could be prevented by configuring the Web Component to be completely unfocusable.) Hope this helps answer your [question/curiosity](https://github.com/WICG/webcomponents/issues/762#issuecomment-704692124). -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/762#issuecomment-3289994814 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/762/3289994814@github.com>
Received on Sunday, 14 September 2025 22:51:14 UTC