Closed Bug 2067078 Opened 3 months ago Closed 2 months ago

Say that the clicked node was not visible when an accessibility check falls back to its ancestor

Categories

(Testing :: Mochitest, task)

task

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

When a test clicks a node hidden by visibility: hidden, that node has no accessible, so findInteractiveAccessible() walks up the flattened tree and the checks run on an ancestor instead. The failure then names a node the test never clicked:

Node is not focusable via the accessibility API: id: , tagName: div, className: preview-row

AccessibilityUtils.handleEvent already skips the checks for a clicked node with empty bounds, on the grounds that a test clicking a hidden node is not testing that node's UI. A visibility: hidden node keeps its layout bounds, so it gets past that guard.

This is bug 2062444, where 1,294 failures in 21 days pointed at .preview-row for a test that only ever clicks the .close-button inside it, which is visibility: hidden until the row is hovered. Reading the message as a statement about the row sends people looking for a missing tabindex on an element the test does not touch.

Name the hidden node instead:

Node is not focusable via the accessibility API: id: , tagName: div, className: preview-row. The test clicked inside a node that is not visible (id: , tagName: moz-button, className: close-button) and so has no accessible; the checks ran on this ancestor of it instead

Only the message changes; the same cases fail as before.

Same shape as bug 2063565 for popups that are not open, which depends on bug 2062572.

Making a click on an invisible node fail in its own right, the way bug 2062572 did for clicks inside a popup that is not open, is the natural follow-up, but it needs a tree-wide sweep first: today such a click passes silently whenever the ancestor the checks land on is healthy.

See Also: → 2067165

A node hidden by visibility: hidden keeps its layout bounds, so it gets past the
empty bounds check in handleEvent, but it has no accessible:
findInteractiveAccessible() then substitutes another node, and the failure names
one the test never clicked. Name the hidden node as well.

The clause is added in buildMessage rather than at one failure site because all
five checks report on the substituted node and mislead identically. Only the
message changes.

Assignee: nobody → florian
Status: NEW → ASSIGNED
Attachment #9631739 - Attachment description: Bug 2067078 - Say that the clicked node was not visible when an a11y check falls back to another node, r=#firefox-desktop-core-reviewers,Jamie. → Bug 2067078 - Name the clicked node when an a11y check falls back to another node, r=#firefox-desktop-core-reviewers,Jamie.
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: