Bug 260026 - AX: aria-current.html fails in isolated tree mode
Summary: AX: aria-current.html fails in isolated tree mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-10 09:50 PDT by Joshua Hoffman
Modified: 2023-08-11 07:39 PDT (History)
11 users (show)

See Also:


Attachments
Patch (5.55 KB, patch)
2023-08-10 11:22 PDT, Joshua Hoffman
no flags Details | Formatted Diff | Diff
Patch (5.57 KB, patch)
2023-08-10 11:46 PDT, Joshua Hoffman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Hoffman 2023-08-10 09:50:21 PDT
The aria-current.html test fails when run in Isolated Tree Mode.
Comment 1 Radar WebKit Bug Importer 2023-08-10 09:50:33 PDT
<rdar://problem/113698662>
Comment 2 Joshua Hoffman 2023-08-10 11:22:27 PDT
Created attachment 467238 [details]
Patch
Comment 3 Joshua Hoffman 2023-08-10 11:46:12 PDT
Created attachment 467239 [details]
Patch
Comment 4 EWS 2023-08-10 22:29:56 PDT
Committed 266808@main (a5ea28813307): <https://commits.webkit.org/266808@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 467239 [details].
Comment 5 Andres Gonzalez 2023-08-11 07:33:20 PDT
(In reply to Joshua Hoffman from comment #3)
> Created attachment 467239 [details]
> Patch

--- a/LayoutTests/accessibility/aria-current.html
+++ b/LayoutTests/accessibility/aria-current.html

 <p id="description"></p>

As we rework these tests, we are moving away from using the description element and the continuously writing the the console with debug or other means. Instead we declare an output variable to hold all the output and call debug(output) at the end of the test. There are many examples of this pattern throughout the LayoutTests/accessibility dir. This has several advantages, namely, we reduce the source of problems that can occur in ITM to what the test is intended to test, and also the tests run faster.

         for (var i = 0, c = examples.length; i < c; i++) {

for loop control variables should be declared with let instead of var when possible. Also, I don't think you need c, instead you can do I < examples.length

Other local variables like el and expectation may be declared with let as well.
Comment 6 Andres Gonzalez 2023-08-11 07:39:09 PDT
(In reply to Joshua Hoffman from comment #3)
> Created attachment 467239 [details]
> Patch

Another style recommendation, we are starting to flush the <script> code in every test to the left margin instead of indenting everything one extra tab.