Skip to content

[EuiHeaderLinks][KEYBOARD]: HeaderLinks component needs optional ref and tabindex props to facilitate keyboard focus #5248

@1Copenut

Description

@1Copenut

Description
I'd like to request we add two optional props to the <HeaderLinks /> component:

  1. A ref hook of type <HTMLElement>
  2. A tabindex with default value of -1

I'm reviewing an issue in Kibana where focus is not managed properly on the dashboard views when users click the Edit/Save button to switch from View to Edit mode and back again. The larger issue is Kibana-specific, but these props will enable consumers to manage focus with custom event handlers.

Success criteria

  • The ref may only need to be added to our EuiHeaderLinksProps type
  • tabindex="-1" could be a boolean like isFocusable that sets "-1" or only if the prop is passed
  • No focus halo when the element takes focus. I'm happy to discuss this one further, because it's a gray area.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions