Bug 254080

Summary: AX: iOS Voiceover not announcing error messages on input type='date'
Product: WebKit Reporter: Graham Armfield <graham.armfield>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Major CC: andresg_22, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   

Description Graham Armfield 2023-03-17 10:34:09 PDT
Where input type="date" is used in a form with either max or min attribute, the user can still select invalid dates in the calendar view - eg a date after the max value.

If user moves to submit button and submits the form, Safari generates an error message ("Value must be less than or equal to yyyy-mm-dd") adjacent to the input with invalid date and focus is moved back to the date input. But there are two problems here:
1) Voiceover does not announce the generated error message.
2) Voiceover does not announce "invalid data" or some other appropriate indication that an invalid value is present.

So the Voiceover user does not know why the form has not submitted successfully.

What should happen when user submits form:
1) Voiceover should announce what field the user is on, and then announce "invalid data" (like it would if a text box had aria-invalid="true" set on it).
2) Voiceover should announce the generated error message.

The user will then know why the form won't submit, and how they can correct their error.

If necessary you're welcome to test with this page which has some input type="date" elements on it: https://research.coolfields.co.uk/forms/html5-date.html
Comment 1 Radar WebKit Bug Importer 2023-03-17 10:34:20 PDT
<rdar://problem/106864646>