- Should submit buttons be disabled?
- Are disabled buttons bad for accessibility?
- How would you ensure that the button code will disable the submit button if the form is invalid?
Should submit buttons be disabled?
While designing the UI, avoid using a disabled button as it becomes hard to find out why it is disabled and what should be done to make it enable. It is better to keep buttons enabled all the time and highlight the field if users don't provide the required information.
Are disabled buttons bad for accessibility?
Bad accessibility
Sometimes disabled buttons are designed in a way that they cannot be read by a screen reader (buttons are not focusable, and hence users can't reach them with a keyboard). No need to explain that users with disabilities will face problems with such behavior.
How would you ensure that the button code will disable the submit button if the form is invalid?
If the textbox control value is invalid, we also want to disable the submit button so that the user cannot submit the form. We are using the “ng-disabled” property for the control to do this based on the conditional value of the “$dirty” and “$invalid” property of the control.