You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When programmatically selected HTMLButtonElement elements using :focus-visible to manage visible focus state will not be rendered with an outline/focus ring inside a dialog. There's an HTML proposal linked below which would update FocusOptions so in the future we'll be able to focus buttons using :focus-visible styles and not only :focus within dialogs:
Without getting into details, this is a long-standing issue which you can read about the merits of within the links provided in the above issue. When the proposal makes it to spec here's the likely enhancement we'll want to make to allow button elements using :focus-visible styles to appear focused when a Dialog is opened:
form[control].focus({focusVisible: true});
Dropping this in a discussion here for now and would expect this to be supported by the upstream Headless UI library when it becomes available.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When programmatically selected
HTMLButtonElement
elements using:focus-visible
to manage visible focus state will not be rendered with an outline/focus ring inside a dialog. There's an HTML proposal linked below which would updateFocusOptions
so in the future we'll be able to focus buttons using:focus-visible
styles and not only:focus
within dialogs:The proposal:
whatwg/html#7830
Without getting into details, this is a long-standing issue which you can read about the merits of within the links provided in the above issue. When the proposal makes it to spec here's the likely enhancement we'll want to make to allow button elements using
:focus-visible
styles to appear focused when aDialog
is opened:Dropping this in a discussion here for now and would expect this to be supported by the upstream Headless UI library when it becomes available.
Beta Was this translation helpful? Give feedback.
All reactions