Description
Description
Today, button and icon button only support native [disabled]
. They should also support aria-disabled
.
The chip component exposes an always-focusable
attribute for this:
material-web/chips/internal/chip.ts
Line 46 in 7867674
We could copy that same API, or we could add a new aria-disabled
attribute to button and icon button.
Pros for always-focusable
- Aligns with chip
Pros for aria-disabled
- Aligns with existing web APIs
- Aligns with other
aria-*
APIs exposed on button (e.g.aria-label
,aria-haspopup
, etc)
I also noticed while looking at chip's implementation that it doesn't set aria-disabled
on its inner button if it's disabled and always focusable. It probably should?
Metadata
Metadata
Assignees
Labels
No labels
Activity
zelliott commentedon Jul 9, 2024
I think it makes most sense to align with chip for now and expose it as
always-focusable
. Then we can always change both chip and button toaria-disabled
if we want in the future.feat: add `alwaysFocusable` property to button and iconbutton
alwaysFocusable
property to button and iconbutton #5673feat: add `alwaysFocusable` property to button and iconbutton
feat: add `soft-disabled` property to button and iconbutton
soft-disabled
attribute #5675feat: add `soft-disabled` property to button and iconbutton
docs(button,iconbutton): add docs for `soft-disabled` attribute
docs(button,iconbutton): add docs for `soft-disabled` attribute
docs(button,iconbutton): add docs for `soft-disabled` attribute
docs(button,iconbutton): add docs for `soft-disabled` attribute