Bug 248104 - AX ITM: Fix for aria-hidden-changes-for-non-ignored-elements.html and html-with-aria-label.html in isolated tree mode.
Summary: AX ITM: Fix for aria-hidden-changes-for-non-ignored-elements.html and html-wi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-18 13:45 PST by Andres Gonzalez
Modified: 2022-11-29 06:10 PST (History)
12 users (show)

See Also:


Attachments
Patch (9.80 KB, patch)
2022-11-18 13:49 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (9.82 KB, patch)
2022-11-28 07:49 PST, 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 2022-11-18 13:45:57 PST
Currently failing in ITM.
Comment 1 Radar WebKit Bug Importer 2022-11-18 13:46:11 PST
<rdar://problem/102528770>
Comment 2 Andres Gonzalez 2022-11-18 13:49:14 PST
Created attachment 463610 [details]
Patch
Comment 3 Tyler Wilcock 2022-11-18 14:06:32 PST
Comment on attachment 463610 [details]
Patch

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

> LayoutTests/accessibility/mac/html-with-aria-label.html:20
> +        html.setAttribute("aria-label", "New Title");

I see this and some other places in this patch are using some implicit object-by-id JS syntax. I think this not recommended:

https://html.spec.whatwg.org/#named-access-on-the-window-object

> As a general rule, relying on this will lead to brittle code. Which IDs end up mapping to this API can vary over time, as new features are added to the web platform, for example. Instead of this, use document.getElementById() or document.querySelector().

> LayoutTests/accessibility/mac/html-with-aria-label.html:22
> +            output += expect("root.description", "'AXDescription: New Title'");

Do we need a `waitFor` here? Maybe moving the expect into the async block is enough...but I wonder if the test is flakey or will become flakey without an explicit waitFor.
Comment 4 Andres Gonzalez 2022-11-28 07:49:38 PST
Created attachment 463762 [details]
Patch
Comment 5 Andres Gonzalez 2022-11-28 07:56:58 PST
(In reply to Tyler Wilcock from comment #3)
> Comment on attachment 463610 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=463610&action=review
> 
> > LayoutTests/accessibility/mac/html-with-aria-label.html:20
> > +        html.setAttribute("aria-label", "New Title");
> 
> I see this and some other places in this patch are using some implicit
> object-by-id JS syntax. I think this not recommended:
> 
> https://html.spec.whatwg.org/#named-access-on-the-window-object
> 
> > As a general rule, relying on this will lead to brittle code. Which IDs end up mapping to this API can vary over time, as new features are added to the web platform, for example. Instead of this, use document.getElementById() or document.querySelector().
> 
> > LayoutTests/accessibility/mac/html-with-aria-label.html:22
> > +            output += expect("root.description", "'AXDescription: New Title'");
> 
> Do we need a `waitFor` here? Maybe moving the expect into the async block is
> enough...but I wonder if the test is flakey or will become flakey without an
> explicit waitFor.

Didn't waitFor intentionally because doesn't seem to be necessary, no failures with --iterations=1000. In real scenarios, there may not be a wait at all, so want to reduce the use of waitFor to when it is strictly necessary. Having said that, will revisit if flakiness shows up in the bots.
Comment 6 Tyler Wilcock 2022-11-28 09:15:47 PST
> Didn't waitFor intentionally because doesn't seem to be necessary, no
> failures with --iterations=1000. In real scenarios, there may not be a wait
> at all, so want to reduce the use of waitFor to when it is strictly
> necessary. Having said that, will revisit if flakiness shows up in the bots.
OK, sounds good!
Comment 7 EWS 2022-11-29 06:10:26 PST
Committed 257113@main (557946b122c5): <https://commits.webkit.org/257113@main>

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