Skip to content

[EuiKeyboardAccessible] Discuss deprecation #3838

@myasonik

Description

@myasonik

I'd like to deprecate and remove EuiKeyboardAccessible.

From the docs:

You can make interactive elements keyboard-accessible with the EuiKeyboardAccessible component. This is necessary for non-button elements and a tags without href attributes.

But that doesn't seem to hold up because:

  1. All interactive elements should either be a native HTML element (e.g., button, anchor, label) or are more complex components (e.g., tabs, typeaheads) that require a lot more work than what EuiKeyboardAccessible does or even could reasonably do
  2. The example here of anchors without href attributes shouldn't be interactive so I wouldn't recommend using it like that

And, taking a look at Kibana as an example, there are 5 uses of it today:

  • 2 are being used on divs that should probably be converted to native button elements
  • 1 is being used as some super janky focus control and doesn't do anything and should probably just be removed
  • 1 is wrapping a div which wraps a button element... so, I guess should probably be removed?
  • 1 is wrapping an anchor so should probably be removed

So, at least in Kibana, there seems to be a lot of misuse of it already.

Metadata

Metadata

Assignees

No one assigned

    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