angular formContol.disable() is not web accessibility

78 views Asked by At

angular formControl.disabled add disabled attribute to html, this attribute is not web accessibility and you need to use aria-disabled to web-accessibility. Is there a way to make formControl.disable not use disabled, but instead use aria-disabled?

angular form is not web accessibility

1

There are 1 answers

0
Frank van Eldijk-Smeding On

The following documentation on aria-disabled mentions that it will inform the user that the current state of the interactive element (e.g. button, input) is disabled.

However, aria-disabled doesn't perform any style changes. With the regular disabled attribute you'll get the correct state & visual changes (e.g. the cursor).

So, aria-disabled and disabled both inform the correct state to the user. But with disabled you'll have to do less yourself.