Skip to content

Conversation

@mgadewoll
Copy link
Contributor

@mgadewoll mgadewoll commented Nov 20, 2025

Summary

This PR is a tiny follow-up to #9201 which introduced custom disabled behavior for buttons via aria-disabled. To support the change in styles, we added the helper selector euiDisabledSelector that combines :disabled and [aria-disabled="true"] selectors.

This PR updates the shared button styles in useEuiButtonColorCSS to use the new euiDisabledSelector. This update is mainly a cleanup/enhancement as the styles were also working as expected before for EUI button components as pointer events are removed.

Why are we making this change?

💪 Robustness: Ensures that potential custom usages of useEuiButtonColorCSS would correctly handle custom disabled selectors via aria-disabled too.

Impact to users

🟢 There are no changes required on consumer side.

QA

🧪 Storybook:

Checks:

  • verify hover states work as expected for EUI button components (with hasDisabled set to true or false as well as isDisabled set to true or false) and that there is no regression with production

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
    • If the changes unblock an issue in a different repo, smoke tested carefully (see Testing EUI features in Kibana ahead of time)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@mgadewoll mgadewoll self-assigned this Nov 20, 2025
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @mgadewoll

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @mgadewoll

@mgadewoll mgadewoll marked this pull request as ready for review November 20, 2025 12:02
@mgadewoll mgadewoll requested a review from a team as a code owner November 20, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants