Problem/Motivation
While reevaluating #2852874: [Meta] Set the required state for all fields in Core in the Accessibility Object Model (AOM) it turned out that some of the fields in core also have not properly set the invalid state for fields that failed the validation on a form submit and in consequence are not programmatically labeled as invalid (see invalid_data.mp4) The affected fields in the test with Safari and VoiceOver were:
- Formatted long text
- Formatted long text with summary
- Date datetime
- Date datetime range
- Date timestamp
- Comment
The fields in point 1,2, and 6 are not labeled and announced as invalid in Safari, Firefox and Edge with VoiceOver active. While the fields in point 3,4, and 5 are properly announced as invalid in Firefox, but not in Safari and Edge.
Steps to reproduce
- Create a content type
- Add all available fields and make each of them required
- Create a node of the newly created content type
- Enable your screenreader of choice and submit the form without entering anything so each field errors out
Proposed resolution
Validate all available fields in core in other screenreaders like for example Jaws, NVDA, or Orca and figure out if there are more problems in different set ups.
Create dedicated issues for each affected field type and make sure that the aria-invalid="true" attribute is getting added and the field is properly announced as invalid.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Date_Timestamp.png | 57.13 KB | mgifford |
| #3 | Datetime.png | 69.37 KB | mgifford |
| #3 | Date_Range.png | 51.58 KB | mgifford |
| #3 | Plain_Long_Text.png | 31.94 KB | mgifford |
| invalid_data.mp4 | 5.54 MB | rkoller |
Issue fork drupal-3600851
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mgiffordPlaywright can be used to test this as well:
Comment #3
mgiffordFormatted long text
Date and time
Screenshots from video by @rkoller
I've confirmed this in my local testing (and using https://www.guidepup.dev )
Comment #5
mgiffordAI was used in the creation of this patch and the testing here. I'm still getting the branching wrong, but do look at the main branch not the other.
Comment #6
mgiffordThis isn't working in my tests locally.