I am creating a button component using aria-disabled for managing disabled state instead of disabled attribute to accommodate accessibility requirements.
Earlier I used CSS pseudo-class :disabled to style the disabled component. Is there a way to use it with aria-disabled="true" to style the button and aria-* attributes in general?
Just apply an attribute selector instead of :disabled:
[aria-disabled="true"] { /* your declarations */ }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With