Skip to content

Mixin For Delegated Focus Shadow Roots? #6

@dyoder

Description

@dyoder

Our current shadowed mixin defaults to not delegating focus (delegatesFocus is false, which is also the default). We override this in the field mixin to set delegatesFocus to true because field elements probably want to accept focus. However, it's possible that a non-field component would want to accept focus as well. Similarly, a field-level component may not want to use the field mixin, in which case it would be convenient to have a mixin that sets the shadowRoot with delegatesFocus to true.

Background

When delegatesFocus is set to true, the browser makes a best effort to display the whole component as being in focus, even if the human clicks on (or otherwise interacts with) a non-focusable element within the component. Learn more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions