open-ui
open-ui copied to clipboard
[focusgroup] Restrict usage of focusgroup on certain elements
Forked from discussions on issue #990:
Probably worth restricting focusgroup application to certain nodes (@keithamus, @lukewarlow, @scottaohara) -- e.g., not
or
This issue can track the discussion on which elements should not have focusgroup apply because no users should/will expect focusgroup behavior on such elements. See also, the related issue of how focusgroup behavior should (if at all) apply to elements that already have built-in focusgroup-like behavior #995.
The original concern is that placing a focusgroup on elements that aren't typically used for building UI widgets or that wouldn't have a role associated with a UI widget could be harmful for the accessibility of the web.
At present, both
<html><body>and probably<head>
Are among the restricted elements candidates.
Dialog doesn't allow tabindex and I suspect should also not allow focusgroup
The spec's updated now, following PR #1021, but there's still an open question in there about restrictions. I looked at the Shadow DOM attachShadow restrictions, and I think its a bit too restrictive for focusgroup use cases--given that <table> is excluded...
There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.