Back to Kibana

`@elastic/eui` accessibility ESLint rules

.agents/skills/accessibility/references/eslint.md

9.5.03.3 KB
Original Source

@elastic/eui accessibility ESLint rules

Secondary path: when starting from a rule id, jump to the canonical component guide that explains the pattern. Read shared_principles.md first; the manual-review column lists shapes the rule cannot resolve automatically.

Rule idComponent guideManual review
@elastic/eui/accessible-interactive-elementcomponents/focus_and_keyboard.mdtabIndex only from {...props} or HOC; do not redesign roving tabindex.
@elastic/eui/badge-accessibility-rulescomponents/interactive_components.mdDirect child of EuiFormRow (row supplies name); {...props} with unknown aria-*.
@elastic/eui/callout-announce-on-mountcomponents/callouts.md{...props} on EuiCallOut without explicit announceOnMount; always-mounted callout (rule should not fire).
@elastic/eui/consistent-is-invalid-propscomponents/form_layout.mdNested EuiFormRow (innermost pair first); child is {...fieldProps} — confirm isInvalid not already in spread.
@elastic/eui/icon-accessibility-rulescomponents/icons_and_tooltips.md{...iconProps} may already include a11y props.
@elastic/eui/no-unnamed-interactive-elementcomponents/interactive_components.mdDirect child of EuiFormRow (row supplies name); {...props} with unknown aria-*.
@elastic/eui/no-unnamed-radio-groupcomponents/radio_groups.md{...groupProps} — verify name in spread before adding.
@elastic/eui/prefer-eui-icon-tipcomponents/icons_and_tooltips.mdNot a single EuiIcon child; icon has onClick / unsupported props — skip or escalate.
@elastic/eui/require-aria-label-for-modalscomponents/overlays.md{...props} hides wiring; no visible title without UX change — escalate.
@elastic/eui/require-table-captioncomponents/data_tables.mdtableCaption only via {...tableProps} — fix at source; no duplicate conflicting captions.
@elastic/eui/sr-output-disabled-tooltipcomponents/tooltip_icon.mdEuiToolTip props from spread; child not EuiButtonIcon.
@elastic/eui/tooltip-button-icon-wrapcomponents/tooltip_icon.md{...props} without an explicit title is silently skipped — verify the spread does not omit a tooltip. No aria-label on the button → autofix can't run; supply both aria-label and EuiToolTip content.
@elastic/eui/tooltip-focusable-anchorcomponents/focus_and_keyboard.md{...anchorProps} or unknown custom anchor.
@elastic/eui/tooltip-no-interactive-contentcomponents/tooltip_content.mdVariable content (content={var} / title={var}) is silently skipped — trace and verify. EuiBadge / EuiBetaBadge / EuiCard with onClick / href become focusable and need migration to EuiPopover.