Skip to content

[css-ui] outline is not visible when moving focus programmatically #4421

Open
@Yaffle

Description

@Yaffle

Hello,

Some web browsers on some platforms have started to hide the focus ring (outline) until a user uses TAB key. But it is needed to change the focus programmatically in response to a keydown event, there is no way to tell the browser to show the focus ring.

:focus {
  outline: <something>; /* no way to tell it to show the default outline: it will be non-default or hidden*/
}

My use case: https://jsfiddle.net/82fdoqL5/embedded/result/
My bug against Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1585955#c8
I was suggested to solve this by using an option to a "focus" method, but this needs a change in the HTML spec: whatwg/html#5004

Can CSS provide something to help with this?
Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.Commenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions