Bug 226754

Summary: iOS - VoiceOver reads the old heading text when updated with heading.firstChild.data.
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
Patch
none
Patch none

Description Andres Gonzalez 2021-06-07 20:14:17 PDT
iOS - VoiceOver reads the old heading text when updated with heading.firstChild.data.
Comment 1 Radar WebKit Bug Importer 2021-06-07 20:14:28 PDT
<rdar://problem/78979269>
Comment 2 Andres Gonzalez 2021-06-07 20:17:57 PDT
rdar://44949563
Comment 3 Andres Gonzalez 2021-06-07 20:32:55 PDT
Created attachment 430804 [details]
Patch
Comment 4 chris fleizach 2021-06-07 20:46:17 PDT
Comment on attachment 430804 [details]
Patch

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

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:689
> +                String headingLabel = parent->descriptionAttributeValue();

can use auto here
Comment 5 Andres Gonzalez 2021-06-08 20:18:51 PDT
Created attachment 430937 [details]
Patch
Comment 6 Andres Gonzalez 2021-06-08 20:25:15 PDT
Created attachment 430938 [details]
Patch
Comment 7 Andres Gonzalez 2021-06-08 20:27:58 PDT
(In reply to chris fleizach from comment #4)
> Comment on attachment 430804 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=430804&action=review
> 
> > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:689
> > +                String headingLabel = parent->descriptionAttributeValue();
> 
> can use auto here

Done, although not a fan of using auto instead of types like String, unless there is a reason for it, don't think it gains in readability.
Comment 8 chris fleizach 2021-06-08 20:44:50 PDT
Comment on attachment 430938 [details]
Patch

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

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1191
> +    if (backingObject->roleValue() == AccessibilityRole::StaticText) {

Can we check here if it has the heading trait before looking for the ancestor?
Comment 9 Andres Gonzalez 2021-06-09 07:41:51 PDT
Created attachment 430964 [details]
Patch
Comment 10 Andres Gonzalez 2021-06-09 07:43:21 PDT
(In reply to chris fleizach from comment #8)
> Comment on attachment 430938 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=430938&action=review
> 
> > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1191
> > +    if (backingObject->roleValue() == AccessibilityRole::StaticText) {
> 
> Can we check here if it has the heading trait before looking for the
> ancestor?

Yes, done.
Comment 11 EWS 2021-06-09 17:11:48 PDT
Committed r278683 (238660@main): <https://commits.webkit.org/238660@main>

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