4 ms·
The article doesn't mention this, but if you are going to build your own disabled state, at the very least include an aria-disabled attribute on your button. Se
by danShumway 3y ago
The article doesn't mention this, but if you are going to build your own disabled state, at the very least include an aria-disabled attribute on your button. See Mozilla docs on the subject, which mention this exact same scenario: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled https://developer.mozilla.org/en-US/docs/Web/Accessibility/A...
Using pure-CSS and data-attributes without additional indicators doesn't help low-vision users; the only thing they'll be able to tell is that click doesn't work on some of your buttons, they won't be able to see the CSS or non-semantic attributes that say the button is disabled. If you're getting rid of browser semantics, you need to include the relevant aria semantics to compensate.