Closed
[EuiComboBox] Prevent option title from leaking to list item and keep it on text node#9883
title from leaking to list item and keep it on text node#9883Conversation
Co-authored-by: alexwizp <20072247+alexwizp@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix the code for review comment suggestion
[EuiComboBox] Prevent option Aug 10, 2026
title from leaking to list item and keep it on text node
1 visual difference(s) found - expand to review, then click Approve visual changes to update baselineseuidatagrid (1 difference)
|
💔 Build Failed
Failed CI StepsHistorycc @alexwizp @Copilot |
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
This addresses the single review comment on PR #9850: combo box options could still place
titleon the option<li>via spread props, causing duplicate screen reader announcement paths. The change ensures option-leveltitleis intercepted and applied only to the inner text element.EuiComboBoxOptionsListto striptitlefrom option rest props before spreading ontoEuiListItemLayout, then pass title viatextPropsonly.titleon the option element while preserving consumer-provided/native truncation tooltip behavior.title: optionTitlefrom option objecttitle(consumeroptionTitlefirst, truncation fallback second)titleprop from option<li>and settextProps={{ title }}title.euiListItemLayout__textdoes havetitleAPI Changes
titleattribute placementtitleis no longer allowed on option<li>via spread props; it is applied to the inner text elementScreenshots
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
titleshould target the inner text element instead.Impact level: 🟢 Low
Release Readiness
N/AN/AN/AN/AQA instructions for reviewer
EuiComboBoxwith an option that includestitle.role="option") and confirm it has notitleattribute..euiListItemLayout__textcontains thetitleattribute.Checklist before marking Ready for Review
breaking changelabel (if applicable)Reviewer checklist