I think we can get away with two states, with several caveats.
The states would be:
focusable
(orauto
, or...)default
(orunfocusable
, or...)
The caveats:
unfocusable
custom elements would still be programmatically focusable.- Safari would need to determine click/sequential focusability of
focusable
elements based onElementInternals
role.
https://gist.github.com/alice/bac0f6741b852f6e87f53e028efbde2f gives an example of using these two states to manage focus within a complex custom element.