Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiComboBox] Remove Pill delete button is not accessible from the keyboard #8104

Closed
alexwizp opened this issue Oct 29, 2024 · 0 comments · Fixed by #8105
Closed

[EuiComboBox] Remove Pill delete button is not accessible from the keyboard #8104

alexwizp opened this issue Oct 29, 2024 · 0 comments · Fixed by #8105
Assignees
Labels
accessibility low hanging fruit An issue, often a bug, that is lower effort and clearly ought to be fixed

Comments

@alexwizp
Copy link
Contributor

Description:
This issue is associated with GitHub issue #196825 in the Elastic Kibana repository. Upon investigation, it is confirmed that pressing the Enter key does not trigger the corresponding removal action. This behavior does not align with WCAG 2.1.1 Keyboard Accessibility (Level A) guidelines, which stipulate that all functions should be accessible by keyboard alone.

Current Workaround:
Users can press the Space key as a temporary alternative. However, this solution may not be intuitive and is suitable only as a short-term.

Root Cause:
The issue appears to originate in the packages/eui/src/components/combo_box/combo_box.tsx file. The following lines prevent the Enter key from triggering the expected action. While removing these lines resolves the issue, the original purpose of this code is unclear, and further review may be needed to ensure it does not disrupt other functionalities.

 case keys.ENTER:
-       event.preventDefault();
-       event.stopPropagation();
        if (this.hasActiveOption()) {
          this.onAddOption(
            this.state.matchingOptions[this.state.activeOptionIndex]
          );
        } else {
          this setCustomOptions(false);
        }
        break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility low hanging fruit An issue, often a bug, that is lower effort and clearly ought to be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants