Bug 226754 - iOS - VoiceOver reads the old heading text when updated with heading.firstChild.data.
Summary: iOS - VoiceOver reads the old heading text when updated with heading.firstChi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-07 20:14 PDT by Andres Gonzalez
Modified: 2021-06-09 17:11 PDT (History)
9 users (show)

See Also:


Attachments
Patch (12.20 KB, patch)
2021-06-07 20:32 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (19.13 KB, patch)
2021-06-08 20:18 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (19.13 KB, patch)
2021-06-08 20:25 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (19.19 KB, patch)
2021-06-09 07:41 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].