Bug 221975

Summary: Support aria-errormessage on iOS.
Product: WebKit Reporter: Andres Gonzalez <andresg_22>
Component: AccessibilityAssignee: Andres Gonzalez <andresg_22>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Andres Gonzalez 2021-02-16 10:47:00 PST
Support aria-errormessage on iOS.
Comment 1 Radar WebKit Bug Importer 2021-02-16 10:47:09 PST
<rdar://problem/74397704>
Comment 2 Andres Gonzalez 2021-02-16 11:13:20 PST
Created attachment 420502 [details]
Patch
Comment 3 chris fleizach 2021-02-16 11:16:43 PST
Comment on attachment 420502 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=420502&action=review

> Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:303
> +    id elements = [m_element accessibilityErrorMessageElements];

we should be able to do
NSArray *elements here
and then we don't need to cast to NSArray at line 307

> LayoutTests/accessibility/aria-errormessage.html:9
> +<input aria-errormessage="errorMessage" id="startTime" type="text" value="" aria-invalid="false">

should we have to ids here to test the multi-error case?
Comment 4 Andres Gonzalez 2021-02-16 19:32:13 PST
Created attachment 420583 [details]
Patch
Comment 5 Andres Gonzalez 2021-02-16 19:35:57 PST
(In reply to chris fleizach from comment #3)
> Comment on attachment 420502 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=420502&action=review
> 
> > Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:303
> > +    id elements = [m_element accessibilityErrorMessageElements];
> 
> we should be able to do
> NSArray *elements here
> and then we don't need to cast to NSArray at line 307

Fixed.
> 
> > LayoutTests/accessibility/aria-errormessage.html:9
> > +<input aria-errormessage="errorMessage" id="startTime" type="text" value="" aria-invalid="false">
> 
> should we have to ids here to test the multi-error case?

Done. Added AccessibilitUIElement::errorMessageElements to retrieve the whole array in the script instead of accessing one element at a time.
Comment 6 EWS 2021-02-17 05:00:51 PST
Committed r272993: <https://commits.webkit.org/r272993>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 420583 [details].