You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We introduced an update that adds a new hasAriaDisabled prop to all base button components:
EuiButton
EuiButtonEmpty
EuiButtonIcon
EuiButtonGroup
EuiFilterButton
This new prop is currently in beta and disabled by default. Since the prop changes a native behavior towards a custom implementation, this approach ensures that we can enable it as opt-in feature and test it in scoped scenarios and adjust as needed.
Feature description
The hasAriaDisabled toggles the usage of default disabled attribute with aria-disabled. This results in a custom disabled behavior instead of the native one handled by browsers.
This functionality enabled users to preserve focusability of disabled buttons while also keeping them semantically and functionally disabled. This is useful when wanting to e.g. add tooltips on disabled buttons to provide additional information why the button is disabled.
new prop
type
default value
description
hasAriaDisabled
boolean
false
Changes the native disabled attribute to aria-disabled to preserve focusability. This results in a semantically disabled button with a custom disabled state behavior instead of the default browser one.
Screen.Recording.2025-11-10.at.18.15.56.mov
Usage Notes (optional)
At the time of rolling this out, there are currently no usages as this feature is introduced as opt-in feature.
ℹ️ Consumers that want to start using hasAriaDisabled on EUI button components, will need to update the following if used:
test assertions checking for disabled attribute -> use the new EUI test helpers instead (docs)
style selectors using :disabled pseudo-selector -> use euiDisabledSelector in CSS-in-JS/JS or :disabled, [aria-disabled="true"] in CSS instead
Next Steps
To facilitate the transition, we should:
Monitor updates to use hasAriaDisabled
Monitor usages of the added test helpers
Monitor if any issues or bugs are reported that are caused by the custom disabled behavior
Overview
hasAriaDisabledprop #9201We introduced an update that adds a new
hasAriaDisabledprop to all base button components:EuiButtonEuiButtonEmptyEuiButtonIconEuiButtonGroupEuiFilterButtonThis new prop is currently in beta and disabled by default. Since the prop changes a native behavior towards a custom implementation, this approach ensures that we can enable it as opt-in feature and test it in scoped scenarios and adjust as needed.
Feature description
The
hasAriaDisabledtoggles the usage of defaultdisabledattribute witharia-disabled. This results in a custom disabled behavior instead of the native one handled by browsers.This functionality enabled users to preserve focusability of disabled buttons while also keeping them semantically and functionally disabled. This is useful when wanting to e.g. add tooltips on disabled buttons to provide additional information why the button is disabled.
hasAriaDisabledbooleanfalsedisabledattribute toaria-disabledto preserve focusability. This results in a semantically disabled button with a custom disabled state behavior instead of the default browser one.Screen.Recording.2025-11-10.at.18.15.56.mov
Usage Notes (optional)
At the time of rolling this out, there are currently no usages as this feature is introduced as opt-in feature.
ℹ️ Consumers that want to start using
hasAriaDisabledon EUI button components, will need to update the following if used:disabledattribute -> use the new EUI test helpers instead (docs):disabledpseudo-selector -> useeuiDisabledSelectorin CSS-in-JS/JS or:disabled, [aria-disabled="true"]in CSS insteadNext Steps
To facilitate the transition, we should:
hasAriaDisabled