The use of HTML5 "required" attribute in D8 has resulted in an accessibility regression. Basic client-side validation now occurs *before* hitting the server and running FAPI validation functions, so the browser jumps in and provides an error as you attempt to submit the form.
In Drupal 7, the FAPI error messages include a) an icon + alt tag to indicate their relative importance (e.g. warning/notice), b) an error message which included the name of the field for reference, c) a red outline on the field.
But in D8, those enhanced error messages are never displayed, in favor of the default browser response to a required field, which in Chrome's case is "Please fill out this field," without any mention of which field is referred to.
The accessibility team's goal for form validation is. HTML5 best practices are:
- Server-side validation
Original report by mgifford
I was very surprised to see that in D8 that we've lost some accessibility in the current release as far as how error messages are presented.
They were much better in D7. In D8 they just say "Please fill out this field.", where in D7 there was a red box describing the problem at the top of the page. The error also had an image and text which identified what exactly the problem was.
Ultimately we need this in core
But the defaults for D8 should be at least as good as they were in D7.
FAILED: [[SimpleTest]]: [MySQL] 56,946 pass(es), 0 fail(s), and 204 exception(s). View
PASSED: [[SimpleTest]]: [MySQL] 42,796 pass(es). View