-
Notifications
You must be signed in to change notification settings - Fork 370
Description
Describe the problem
Followup to #11617 for breaking change release. We should update the logic of aria-disabled being applied. Currently aria-disabled is always set and is setup to basically match the disabled value (otherwise we end up with aria-disabled being false when disabled is true, which is contradictory and has potential to cause issue with AT -- FWIW in limited testing it seems like disabled has priority, but should still be considered an issue).
Additionally, we were mixing the way to disable the Button depending on the component
prop in #11478. Instead we should be more explicit that isDisabled
should be used when a) the component is button
, or b) the button doesn't need to be focusable for a tooltip or similar, and isAriaDisabled
should be used when a) the component is anything other than button
, or b) when the button is intended to be focusable/hoverable to trigger a Tooltip or similar.
Expected behavior
aria-disabled only renders when true, which matches how the disabled attribute gets rendered (only when true, not rendered when false), and aria-disabled must be set explicitly (rather than having isDisabled set it when component !== button).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status