Bug 221065

Summary: AX: VoiceOver for iOS does not announce required state for an input with both aria-required="true" and aria-roledescription
Product: WebKit Reporter: Michael Jordan <mijordan>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: andresg_22, cfleizach, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: iPhone / iPad   
OS: iOS 14   
URL: https://codepen.io/majornista/pen/gOLYgZd

Description Michael Jordan 2021-01-27 15:22:10 PST
VoiceOver for iOS does not announce the required state for an input element with both aria-required="true" and aria-roledescription.

For a numeric input stepper that can render its value using currency or other Intl.NumberFormat options, we use aria-roledescription to identify the text input as a "Number field". 

With VoiceOver for iOS, the input role is announced using the aria-roledescription value, however the required state gets omitted. 
With VoiceOver for macOS, the input role is announced as "edit text", and the required state is announced, which I suspect may be because aria-roledescription is being ignored entirely.

The expected behavior would be for states like aria-required to be announced for elements using aria-roledescription.

Here is a url to an example comparing the behavior of two inputs, one that has aria-roledescription and a second without: https://codepen.io/majornista/pen/gOLYgZd
Comment 1 Radar WebKit Bug Importer 2021-01-27 15:22:29 PST
<rdar://problem/73682673>
Comment 2 Smoley 2021-01-29 15:22:17 PST
Thanks for filing, I can reproduce this on iOS 13.6.1 and the latest 14.4 beta. Ccing relevant folks.
Comment 3 chris fleizach 2021-01-29 16:29:19 PST
The macOS bug reported (lack of role desc on text field) is a VoiceOver bug. I've sent a clone of the issue to them: (<rdar://problem/73777103>
Comment 4 chris fleizach 2021-01-29 16:37:05 PST
The iOS issue is also in VoiceOver. I will use this radar to fix the issue there. since no webKit change is required, I will close out this bug. You'll be able to check on the iOS issue in the next update. Not sure about macOS right now