Skip to content

Instantly share code, notes, and snippets.

@alice
Last active April 28, 2020 06:53
Show Gist options
  • Save alice/b83a9d315a4aae30aabbe27710e91c52 to your computer and use it in GitHub Desktop.
Save alice/b83a9d315a4aae30aabbe27710e91c52 to your computer and use it in GitHub Desktop.

I think we can get away with two states, with several caveats.

The states would be:

  • focusable (or auto, or...)
  • default (or unfocusable, or...)

The caveats:

  • unfocusable custom elements would still be programmatically focusable.
  • Safari would need to determine click/sequential focusability of focusable elements based on ElementInternals role.

https://gist.github.com/alice/bac0f6741b852f6e87f53e028efbde2f gives an example of using these two states to manage focus within a complex custom element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment