Bug 243407 - AX: accessibility/add-children-pseudo-element.html is a flakey failure since introduction
Summary: AX: accessibility/add-children-pseudo-element.html is a flakey failure since ...
Status: NEW
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: 2022-08-01 09:06 PDT by Tyler Wilcock
Modified: 2022-08-01 09:06 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2022-08-01 09:06:35 PDT
The expected behavior (that an AXImage with "circle" AXStaticText child is added to the AX tree) has been flakey since introduction, and was only exposed by:

https://bugs.webkit.org/show_bug.cgi?id=243373 (AX: An unnecessary group is created for every block-flow box with no other useful AX semantics)

Because it removed an unnecessary group from the AX tree which this test relied on to "pass". However, on today's `main` I can get the behavior to be wrong 50% of the time.

---

<div id="float" style="display: inline-block;" class="pseudo">
    <span required="" style="color: rgb(194, 0, 0);">Email</span>
    <input type="text" required="" aria-required="true" value="" onkeyup="hidePseudo();">
  </div>
</div>

element = accessibilityController.accessibleElementById("float");
if (accessibilityController.platformName != "atspi")
    shouldBe("element.childrenCount", "3");
else
    shouldBe("element.childrenCount", "2");

debug(dumpAccessibilityTree(accessibilityController.accessibleElementById('content'), null, 0)[1]);

--- The two different `main` results you can regularly get:

Result 1

PASS element.childrenCount is 3
AXRole: AXGroup AXValue:
    AXRole: AXGroup AXValue:
        AXRole: AXStaticText AXValue: Language
        AXRole: AXTextField AXValue:
    AXRole: AXGroup AXValue:
        AXRole: AXStaticText AXValue: Email
        AXRole: AXTextField AXValue:
        AXRole: AXGroup AXValue:

Result 2

PASS element.childrenCount is 3
AXRole: AXGroup AXValue:
    AXRole: AXGroup AXValue:
        AXRole: AXStaticText AXValue: Language
        AXRole: AXTextField AXValue:
    AXRole: AXGroup AXValue:
        AXRole: AXStaticText AXValue: Email
        AXRole: AXTextField AXValue:
        AXRole: AXGroup AXValue:
            AXRole: AXImage AXValue:
                AXRole: AXGroup AXValue:
                    AXRole: AXStaticText AXValue: circle


And after https://bugs.webkit.org/show_bug.cgi?id=243373, here are the two results you can get (note the removal of the group exposes the incorrect behavior):

Result 1

FAIL element.childrenCount should be 3. Was 2.
AXRole: AXGroup AXValue:
    AXRole: AXGroup AXValue:
        AXRole: AXStaticText AXValue: Language
        AXRole: AXTextField AXValue:
    AXRole: AXGroup AXValue:
        AXRole: AXStaticText AXValue: Email
        AXRole: AXTextField AXValue:


Result 2

PASS element.childrenCount is 3
AXRole: AXGroup AXValue:
    AXRole: AXGroup AXValue:
        AXRole: AXStaticText AXValue: Language
        AXRole: AXTextField AXValue:
    AXRole: AXGroup AXValue:
        AXRole: AXStaticText AXValue: Email
        AXRole: AXTextField AXValue:
        AXRole: AXImage AXValue:
            AXRole: AXGroup AXValue:
                AXRole: AXStaticText AXValue: circle
Comment 1 Radar WebKit Bug Importer 2022-08-01 09:06:48 PDT
<rdar://problem/97917082>