Repository navigation
Conversation
- prevent invalid nested interactive elements
Contributor
Author
|
buildkite test this |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an accessibility issue in EuiMarkdownEditor by removing the drop zone wrapper’s misleading role="button", which was creating an invalid nested interactive-element structure around the textarea.
Changes:
- Removes the default drop zone
roleinmarkdown_editor_drop_zone.tsx - Adds a Storybook drop-zone scenario for manual QA
- Updates Jest snapshots and adds a changelog entry for the accessibility fix
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
packages/eui/src/components/markdown_editor/markdown_editor.stories.tsx |
Adds a new DropZone story with a stateful wrapper for manual drag-and-drop testing. |
packages/eui/src/components/markdown_editor/markdown_editor_drop_zone.tsx |
Removes the drop zone wrapper’s role="button" assignment. |
packages/eui/src/components/markdown_editor/__snapshots__/markdown_editor.test.tsx.snap |
Updates rendered snapshots to reflect the removed role attribute. |
packages/eui/changelogs/upcoming/9625.md |
Documents the accessibility fix in the upcoming changelog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
💚 Build SucceededHistory
cc @mgadewoll |
Collaborator
💚 Build Succeeded
History
cc @mgadewoll |
tkajtoch
self-requested a review
May 4, 2026 10:51
weronikaolejniczak
added a commit
to elastic/kibana
that referenced
this pull request
May 11, 2026
## Dependency updates - `@elastic/eui` - v114.3.0 ⏩ v115.0.0 - `@elastic/eslint-plugin-eui` - v2.11.1 ⏩ v2.12.0 ## Package updates ### Summary > [!NOTE] > Please be mindful that as the Design System team we are not aware of your specific area pre-requisites and testing setups, and are realistically not capable of testing the entirety of Kibana. That being said, we want to do our best at migrating breaking changes. All tooltip usages were updated accordingly but there might be mistakes and bugs. That's why, **I would advise every reviewer to smoke-test their domain tooltips**. We'd also greatly appreciate your help with adjusting anything that may be wrong 🙏🏻 https://github.com/user-attachments/assets/2da29c89-aba1-40f9-ae3e-13790a34aedf - tooltips **no longer appear on programmatic focus return** (e.g. when closing flyouts, modals) - unless you're using the keyboard to navigate, - tooltips **do not persist on mouse click** which was annoying for the sighted users and tricky to handle in automated testing environments, - there's **no timeout-based delay** that's inconsistent across Kibana and makes the UI seem laggy, - we made the **animation simpler** and tooltip content **font-size smaller**, resulting in a better visual hierarchy, -VoiceOver no longer has problems with **announcing tooltip content** on trigger focus. These changes have been developed with [SC 1.4.13 Content on Hover or Focus](https://www.w3.org/TR/WCAG21/#content-on-hover-or-focus) in mind while providing the best possible UX. ### `@elastic/eui` [v115.0.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Updated `EuiToolTip` default font size from 14px to 12px ([#9627](elastic/eui#9627)) - Updated `EuiToolTip` show animation to opacity-only with a 150ms grace period delay, preventing visual flickering when quickly hovering over multiple tooltip triggers ([#9626](elastic/eui#9626)) - Updated `EuiToolTip` to respect input modality. Tooltip no longer persists on mouse-click focus or shows on programmatic focus return. ([#9624](elastic/eui#9624)) **Bug fixes** - Fixed `uiPlugins[].button` type to allow UI plugins to not have a toolbar button in `EuiMarkdownEditor` ([#9634](elastic/eui#9634)) - Fixed `EuiToolTip` self-hiding when the mouse moves over child elements within the trigger ([#9626](elastic/eui#9626)) **Breaking changes** - Removed `delay` prop and `ToolTipDelay` type from `EuiToolTip` and `EuiIconTip` ([#9626](elastic/eui#9626)) - Removed `waitForEuiToolTipVisible` and `waitForEuiToolTipHidden` RTL test helpers; tooltip show/hide is now synchronous so direct assertions can be used instead ([#9626](elastic/eui#9626)) **Accessibility** - Fixed invalid nested interactive elements in `EuiMarkdownEditor` by removing `role` from the drop zone wrapper. ([#9625](elastic/eui#9625)) ### `@elastic/eslint-plugin-eui` [v2.12.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md) - Added a new `prefer-tooltip-trigger-focus-test-utility` rule that flags `fireEvent.focus()` inside `it`/`test` blocks that also query for a tooltip. The rule auto-fixes to `focusEuiToolTipTrigger` from EUI's RTL test utilities. ([#9624](elastic/eui#9624)) --------- Co-authored-by: kibanamachine <[email protected]>
patrykkopycinski
pushed a commit
to patrykkopycinski/kibana
that referenced
this pull request
Aug 5, 2026
## Dependency updates - `@elastic/eui` - v114.3.0 ⏩ v115.0.0 - `@elastic/eslint-plugin-eui` - v2.11.1 ⏩ v2.12.0 ## Package updates ### Summary > [!NOTE] > Please be mindful that as the Design System team we are not aware of your specific area pre-requisites and testing setups, and are realistically not capable of testing the entirety of Kibana. That being said, we want to do our best at migrating breaking changes. All tooltip usages were updated accordingly but there might be mistakes and bugs. That's why, **I would advise every reviewer to smoke-test their domain tooltips**. We'd also greatly appreciate your help with adjusting anything that may be wrong 🙏🏻 https://github.com/user-attachments/assets/2da29c89-aba1-40f9-ae3e-13790a34aedf - tooltips **no longer appear on programmatic focus return** (e.g. when closing flyouts, modals) - unless you're using the keyboard to navigate, - tooltips **do not persist on mouse click** which was annoying for the sighted users and tricky to handle in automated testing environments, - there's **no timeout-based delay** that's inconsistent across Kibana and makes the UI seem laggy, - we made the **animation simpler** and tooltip content **font-size smaller**, resulting in a better visual hierarchy, -VoiceOver no longer has problems with **announcing tooltip content** on trigger focus. These changes have been developed with [SC 1.4.13 Content on Hover or Focus](https://www.w3.org/TR/WCAG21/#content-on-hover-or-focus) in mind while providing the best possible UX. ### `@elastic/eui` [v115.0.0](https://github.com/elastic/eui/blob/main/packages/eui/changelogs/CHANGELOG_2026.md) - Updated `EuiToolTip` default font size from 14px to 12px ([elastic#9627](elastic/eui#9627)) - Updated `EuiToolTip` show animation to opacity-only with a 150ms grace period delay, preventing visual flickering when quickly hovering over multiple tooltip triggers ([elastic#9626](elastic/eui#9626)) - Updated `EuiToolTip` to respect input modality. Tooltip no longer persists on mouse-click focus or shows on programmatic focus return. ([elastic#9624](elastic/eui#9624)) **Bug fixes** - Fixed `uiPlugins[].button` type to allow UI plugins to not have a toolbar button in `EuiMarkdownEditor` ([elastic#9634](elastic/eui#9634)) - Fixed `EuiToolTip` self-hiding when the mouse moves over child elements within the trigger ([elastic#9626](elastic/eui#9626)) **Breaking changes** - Removed `delay` prop and `ToolTipDelay` type from `EuiToolTip` and `EuiIconTip` ([elastic#9626](elastic/eui#9626)) - Removed `waitForEuiToolTipVisible` and `waitForEuiToolTipHidden` RTL test helpers; tooltip show/hide is now synchronous so direct assertions can be used instead ([elastic#9626](elastic/eui#9626)) **Accessibility** - Fixed invalid nested interactive elements in `EuiMarkdownEditor` by removing `role` from the drop zone wrapper. ([elastic#9625](elastic/eui#9625)) ### `@elastic/eslint-plugin-eui` [v2.12.0](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2026.md) - Added a new `prefer-tooltip-trigger-focus-test-utility` rule that flags `fireEvent.focus()` inside `it`/`test` blocks that also query for a tooltip. The rule auto-fixes to `focusEuiToolTipTrigger` from EUI's RTL test utilities. ([elastic#9624](elastic/eui#9624)) --------- Co-authored-by: kibanamachine <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Caused by: elastic/kibana#263605
This PR updates
EuiMarkdownEditorby removing the addedrole="button"on the drop zone wrapper element.This would result in invalid nested interactive elements as the button would nest the textarea.
The change removes the
rolecompletely, considering that the drop zone doesn't actually support keyboard interaction as is (it's also disabled vianoKeyboardin the drop zone settings). The drop zone basically only works for mouse interaction while we're already making use of a standalone way via a button in the footer to add files instead.API Changes
⚪ No API changes
Screenshots
Screen.Recording.2026-04-30.at.14.06.10.mov
Screen.Recording.2026-04-30.at.14.06.42.mov
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
Impact level: 🟢 Low
The removes
rolemight require snapshot updates.Release Readiness
Documentation: {link to docs page(s)}Figma: {link to Figma or issue}Migration guide: {steps or link, for breaking/visual changes or deprecations}Adoption plan (new features): {link to issue/doc or outline who will integrate this and where}QA instructions for reviewer
💻 EuiMarkdownEditor storybook
Checklist before marking Ready for Review
QA: Tested in CodeSandbox and [Kibana](https://github.com/elastic/eui/blob/main/wiki/contributing-to-eui/testing/testing-in-kibana.md)QA: Tested docs changesBreaking changes: Addedbreaking changelabel (if applicable)Reviewer checklist