Affects Version/s: 6.2.X EE, 7.0.X EE, Master
When a field is invalid, the attribute: aria-invalid, can be used to let screen readers know that a field is considered invalid.
For this issue, the aria-invalid attribute is set properly during validation, when the form is attempted to be submitted.
But, the aria-invalid attribute is not set properly after a user interacts with the field, due to the current behavior of onblur validation.
STEPS TO REPRODUCE
- Install JAWS screen reader
- Attempt to send a form with a name, but no content through the Web Form portlet.
- The form shows "This field is mandatory." above the "Comments" field
- Click on the "Comments" field to gain focus
- Notice that the JAWS screen reader notifies the user that the field is invalid
- Click out of the "Comments" field to lose focus
- Click on the "Comments" field again to gain focus
JAWS screen reader notifies the user that the field is invalid
JAWS screen reader does not notify the user that the field is invalid