Open edmorrish opened 4 years ago
Hey @edmorrish . ~We had a vaguely similar issue while working on something else this week which may have been easier to solve with this approach~. Actually this wouldn't have helped at all but I've no major objection to the idea. Any other thoughts from others welcome :-)
For accessibility reasons (screenreader support) it is sometimes useful to have the browser's focus linked to the focus state of the LRUD tree.
At the moment to do this you can set the tabindex for every element in the LRUD tree to "-1" and then add a listener for the "focus" event that sets the DOM focus to match the element, we could maybe make this process a little easier by having a config option to automatically add the tabindexes and keep the browser focus state in sync with the LRUD focus.
Any thoughts?