Problem/Motivation
The created widget has a tab index of 0, but also an 'unselectable' attribute. It's not actually possible to tab to it since it has a display: none; set, so its somewhat redundant.
Steps to reproduce
Proposed resolution
jquery-ui already has a similar solution in place.
See https://web.dev/control-focus-with-tabindex/#remove-an-element-from-the-tab-order and https://www.456bereastreet.com/archive/201108/do_not_use_displaynone_to_visually_hide_content_intended_for_screen_readers/
This removes an element from the natural tab order, but the element can still be focused by calling its focus() method.
The tabIndex can be updated to be removed or set to -1 (to be more explicit) so that it's no longer focusable.
The autocomplete dropdown is only ever visible whenever the input field is in focus anyway making it impossible to tab into otherwise making its existence somewhat irrelevant lol.
Remaining tasks
Provide patch/issue fork.
User interface changes
N/A.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | search_api_autocomplete-3385144-accessibility-improvement-pre-3339352-3.diff | 620 bytes | codebymikey |
| #3 | search_api_autocomplete-3385144-accessibility-improvement-3.diff | 667 bytes | codebymikey |
Issue fork search_api_autocomplete-3385144
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
codebymikey commentedComment #4
drunken monkeyMakes sense, thanks a lot!
Merged.