Skip to content

[Tooltips] Remove or replace title HTML attribute #9566

Closed

Description

@weronikaolejniczak

The purpose of this task is to remove or replace the title HTML attribute usage in our repository and flag all the places in Kibana that need updating / update them.

Requires audit in EUI and Kibana That audit can happen on the task.

Partially covered on consumer side with: #9578

Activity

  1. weronikaolejniczak commented on May 5, 2026

    @weronikaolejniczak
    ContributorAuthor

    Title attribute audit

    Tracks all title HTML attribute usages across EUI and Kibana that should be replaced with EuiToolTip.

    Partially covered for EuiButtonIcon (82 Kibana instances) in Usage analysis.

    EUI

    All usages found with grep across packages/eui/src/components/**/*.tsx, excluding test/story files.

    1. Truncated text fallback

    title set to the full text so browsers show it natively when content is clipped.

    Long-term fix: replace with EuiToolTip internally.

    Component File Usage
    EuiBadge badge/badge.tsx:332–388 title={innerText} on span/button/anchor — 4 variants
    EuiButtonGroupButton button/button_group/button_group_button.tsx:147 title={innerText} on EuiButtonDisplay
    EuiComboBoxPill combo_box/combo_box_input/combo_box_pill.tsx:82,99 title={children} on EuiBadge
    EuiComboBoxOptionsList combo_box/combo_box_options_list/combo_box_options_list.tsx:219 title={label} on <li>
    EuiFacetButton facet/facet_button.tsx:132 title={aria-label || innerText}
    EuiFilterButton filter_group/filter_button.tsx:232 title={dataText} on <span>
    EuiInlineEditForm inline_edit/inline_edit_form.tsx:375 title={value} on display element
    EuiListGroupItem list_group/list_group_item.tsx:257 title={label || innerText} on <span>
    EuiRangeTicks form/range/range_ticks.tsx:146 title={label || innerText} on tick <span>
    EuiSelectableList selectable/selectable_list/selectable_list.tsx:475 title={label} on <li>
    EuiSideNavItem side_nav/side_nav_item.tsx:271 title={innerText} (only when truncate)
    EuiTableHeaderCell table/table_header_cell.tsx:146 title={desc || innerText} on <span>
    EuiTextTruncate text_truncate/text_truncate.tsx:224 title={text} (only when isTruncating)
    EuiDataGridHeaderCell datagrid/body/header/data_grid_header_cell.tsx:148,168 title={title} on header cell
    EuiDataGridCellActions datagrid/body/cell/data_grid_cell_actions.tsx:65 title={expandButtonTitle} on expand button

    2. Disabled state tooltip (anti-pattern)

    title used to surface a tooltip on a disabled element, exactly the pattern we tell consumers not to use. These are the highest priority fixes in EUI.

    Component File Usage
    EuiBasicTable (default action) basic_table/default_item_action.tsx:93 title={!enabled ? tooltipContent : undefined}
    EuiBasicTable (collapsed actions) basic_table/collapsed_item_actions.tsx:141 title={actionsDisabled ? label : undefined}

    Fix: wrap the action element with EuiToolTip and use aria-disabled instead of disabled.

    3. Button/action label duplication

    title mirrors an aria-label or accessible text already present. Generally redundant; some should become EuiToolTip, others can just be removed.

    Component File Usage
    EuiAvatar avatar/avatar.tsx:210 title={name} on root <div>
    EuiBadge (icon click) badge/badge.tsx:275 title={iconOnClickAriaLabel} on icon button
    EuiBetaBadge badge/beta_badge/beta_badge.tsx:204,216,231,256 title={label || title} on button/anchor/span
    EuiBreadcrumb breadcrumbs/breadcrumb.tsx:66 title={ariaLabel}
    EuiBreadcrumbContent breadcrumbs/_breadcrumb_content.tsx:206 title={title} on EuiLink
    EuiAutoRefresh date_picker/auto_refresh/auto_refresh.tsx:148 title={label} on toggle button
    EuiAbsoluteTab date_picker/.../absolute_tab.tsx:236 title={submitButtonLabel} on button
    EuiDatePopoverButton date_picker/.../date_popover_button.tsx:129 title={title} on button
    EuiKeyPadMenuItem key_pad_menu/key_pad_menu_item.tsx:322 title={betaBadgeLabel} on item
    EuiFieldPassword (toggle) form/field_password/field_password.tsx:138 title={showPasswordLabel || maskPasswordLabel}
    EuiMarkdownEditorHelpButton markdown_editor/markdown_editor_help_button.tsx:154 title={syntaxTitle}
    EuiPaginationButtonArrow pagination/pagination_button_arrow.tsx:70 title={labels[type]} (suppressed when disabled)
    EuiSearchBar search_bar/search_bar.tsx:300 title={error.message} on search input
    EuiForm form/form.tsx:108 title={addressFormErrors}
    EuiBasicTable (checkbox) basic_table/basic_table.tsx:751,1189 title={action label} on checkbox inputs

    4. SVG accessibility (keep)

    Component File Notes
    EuiIcon icon/icon.tsx:333 title={accessibleTitle} inside <svg>, correct pattern, must not be changed
    EuiToken token/token.tsx:115 title={title} passed to EuiIcon → becomes SVG title

    5. Edge cases

    • time_window_buttons.tsx:160,176,195,214 - title="" on buttons. Intentionally empty to suppress browser tooltips on elements that already have visual labels. Investigate before touching.

    Kibana

    Searches run across src/, x-pack/platform/plugins/, x-pack/solutions/, excluding test/story files.

    Standalone HTML element usages (~31 instances)

    Breakdown by element: <span> ×19, <p> ×6, <div> ×4, <h4> ×2.

    Easy - direct wrap with EuiToolTip or migrate to EuiTextTruncate (≤30 min each)

    File Usage Pattern
    cases/public/components/truncated_text/index.tsx:28 <span css={...} title={text}> Custom truncation component → replace whole component with EuiTextTruncate
    reporting/public/management/components/truncated_title.tsx:28 <span css={...} title={text}> Same pattern as above
    saved_objects_management/.../import_summary.tsx:327 <p className="eui-textTruncate" title={title}> Wrap with EuiToolTip
    kbn-grouping/.../accordion_panel/index.tsx:46 <h4 className="eui-textTruncate" title={title}> Wrap with EuiToolTip
    spaces/.../space_result_details.tsx:175 <p className="eui-textTruncate" title={name}> Wrap with EuiToolTip
    agent_builder/.../command_badge_text.tsx:71 <span title={fullBadgeText}> Wrap with EuiToolTip
    security/.../endpoint_runscript_script_selector.tsx:117 <div className="eui-textTruncate" title={endpointScript.name}> Wrap with EuiToolTip
    security/.../pending_actions_selector.tsx:196 <div title={valueText}> Wrap with EuiToolTip
    security/.../custom_script_selector.tsx:215 <div title={valueText}> Wrap with EuiToolTip
    search_playground/.../summarization_model.tsx:74 <span title={model.connectorName}> Wrap with EuiToolTip

    Medium - table column renders or layout constraints (1–3 hrs each)

    File Usage Complication
    aiops/.../log_rate_analysis_results_table/use_columns.tsx:287,304 <span title={fieldName}>, <span title={fieldValue}> Inside column render; EuiToolTip adds DOM node that may affect table layout
    ml/.../analytics_list/use_columns.tsx:239,251 <span title={id}>, <span title={description}> Same — column render
    ml/.../model_management/model_link.tsx:25 <EuiLink title={id}> with truncation CSS EuiLink passes title to <a> → replace CSS truncation with EuiTextTruncate inside link
    transform/.../transform_list/use_columns.tsx:144,245 <span title={transformId}>, <span title={text}> Column render
    fleet/.../agentless_table.tsx:215 <span className="eui-textTruncate" title={updatedAt}> Column render
    fleet/.../agent_based_table.tsx:215 <span className="eui-textTruncate" title={updatedAt}> Same
    fleet/.../outputs_table/index.tsx:70,106 <p title={output.name}>, <p title={host}> Column renders
    fleet/.../fleet_server_hosts_table/index.tsx:52,86 <p title={...}> Column renders
    fleet/.../enrollment_token_list_page/columns.tsx:46 <span className="eui-textTruncate" title={value}> Column render
    triggers_actions_ui/.../rules_list_table.tsx:440 <EuiLink title={name}> EuiLink passes to <a>
    ml/.../analytics_list/use_columns.tsx:159 <EuiLink title={jobId}> with truncation CSS Same as model_link
    alerting_v2/.../episode_assignee_cell.tsx:49,59,82 <EuiText title={...}> (3×) EuiText passes title to DOM <div>
    security/.../file_selector.tsx:135 <div className="eui-textTruncate" title={selectedFileTitleTooltip}> Nearby popover state — check interactions
    apm/.../externals_list_contents.tsx:60,64 <EuiDescriptionListTitle title={title}>, <EuiDescriptionListDescription title={desc}> Both pass to DOM; need to wrap content instead
    security/.../host_risk_score_table/columns.tsx:91 and 3 identical files <span title={riskScore}> 4 parallel column files — fix once, copy across
    security/.../resolution_group_table.tsx:139,174,184 <EuiLink title={name}>, <EuiText title={...}> ×2 Mixed EuiLink + EuiText in same file

    Complex - requires EUI fix first or class component refactor

    File Usage Complication
    maps/.../features_tooltip/header.tsx:64 <h4 className="eui-textTruncate" title={this.state.layerName}> Class component — needs functional refactor to use hooks for EuiToolTip anchor
    kbn-ui/side-navigation/src/components/secondary_menu/item.tsx:126 <span title={typeof children === 'string' ? children : undefined}> Platform UI package; conditional logic, type guard needed

    EUI component usages with title that pass to DOM

    EuiIcon with title (~15 instances)

    EuiIcon puts title inside the SVG <title> element. Correct for accessibility (names the icon for screen readers). Most Kibana usages are correct and should be left alone.

    Exceptions that should become EuiIconTip:

    File Usage Reason
    cases/.../template_form.tsx:119 <EuiIcon type="check" title="Template saved"> Standalone info icon used as visible status indicator — use EuiIconTip
    apm/.../duration_distribution_chart_with_scrubber/index.tsx:136 <EuiIcon type="info" title={emptySelectionText}> Info icon conveying contextual message — use EuiIconTip

    Keep (SVG accessibility title, correct):

    status_table.tsx, workflows_management.tsx (×2), vega/add_vega_panel_action.tsx, kbn-apm-ui-shared/span_icon, kbn-custom-icons/agent_icon, saved_objects_tagging/result_list.tsx, cases/solution_filter.tsx, lens/layer_actions.tsx, search_getting_started/agent_install.tsx, search/connector_icon.tsx, observability/key_value_filter_list. Title provides screen reader label for the icon, not a hover tooltip.

    home/synopsis.tsx:41, kibana_overview/synopsis.tsx:46 — title="" intentionally marks icons as decorative. Keep.

    EuiText / EuiTextColor with title (~10 instances)

    EuiText renders a <div> (or <p>, <span>) and passes unknown props to the DOM, so title becomes a browser tooltip.

    All instances are truncation + tooltip patterns. Replace: add EuiToolTip wrapping the EuiText content instead of using title.

    File Count
    alerting_v2/.../episode_assignee_cell.tsx 3
    fleet/.../uninstall_token_list_page/index.tsx 1
    fleet/.../agent_policy_summary_line.tsx 1
    security/.../resolution_group_table.tsx 2
    security/.../add_entities_section.tsx 2
    spaces/.../space_card.tsx 1

    EuiLink with title (~4 instances)

    EuiLink renders an <a> tag and passes title to the DOM. All are truncation workarounds — replace with EuiTextTruncate inside the link or wrap with EuiToolTip.

    Already listed in Medium table above.

    EuiButtonIcon with title — 82 instances

    Covered in detail in Usage analysis.md. Tracked separately via #9578.

    Effort summary

    Category Count Effort
    EUI internal fixes (disabled state) 2 High - need to rethink the default_item_action / collapsed_item_actions API
    EUI internal fixes (truncation + label duplication) ~30 Medium - spread across many components, each small but adds up
    Kibana easy (standalone HTML) ~10 Low - 30 min each
    Kibana medium (table columns, EUI components) ~20 Medium - 1–3 hrs each
    Kibana complex (class component, platform) 2 High - estimate separately
    Kibana EuiIcon exceptions → EuiIconTip 2 Low - 15 min each
    Kibana EuiText/EuiLink with title ~14 Low–Medium
    Kibana EuiButtonIcon with title 82 Tracked with #9578
  2. 190 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions