Closed Bug 1922301 Opened 1 year ago Closed 1 year ago

Make sure view transition pseudo-elements are not exposed to a11y.

Categories

(Core :: CSS Parsing and Computation, task)

task
Points:
1

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: emilio, Assigned: boris)

References

(Blocks 1 open bug)

Details

(Whiteboard: [viewtransitions:m2])

Attachments

(1 file, 1 obsolete file)

I suspect this should be as easy as making the view transition root have aria-hidden or so, but worth tracking in case it's larger.

Writing a test might take some work too.

Whiteboard: [viewtransitions:m1]

(In reply to Emilio Cobos Álvarez (:emilio) from comment #0)

I suspect this should be as easy as making the view transition root have aria-hidden or so, but worth tracking in case it's larger.

Writing a test might take some work too.

Yap. Just checked the spec again to make sure this:

  • Elements participating in a view transition are exposed to accessibility tree. See issue 9365.
  • The view transition tree is not exposed to accessibility tree. See issue 9365.

First, I cannot see the pseudo-element tree on the Devtools panel (accessibility tab), and also, I tried to check if our pseudo elements are accessible by the following API (code):

if (nsAccessibilityService* accService = GetAccService()) {
  printf_stderr("%s\n", accService->HasAccessible(node)?"true":"false"); // node is the snapshot cb, ::view-transition, ::view-transition-image-pair, ::view-transition-new, or ::new-transition-old
}

This API checks if this nsINode has an accessible or not. It seems all of the view transition pseudo-elements are not accessible (per our current implementation). So we probably don't need to add aria-hidden.

However, we still need a test for this.

Assignee: nobody → boris.chiou
Status: NEW → ASSIGNED

We don't expose the view transition tree to the accessibility tree per
our current implementation, so this patch only adds the test.

In the test, we use iframe to make the document simpler. We shouldn't
see any view transition pseudo-elements in the tree.

Whiteboard: [viewtransitions:m1] → [viewtransitions:m2]
Points: --- → 1

We don't expose the view transition tree to the accessibility tree per
our current implementation, so only a test in this patch.

In the test, we use iframe to make the document simpler. We shouldn't
see any view transition pseudo-elements in the tree.

Attachment #9484413 - Attachment is obsolete: true
Pushed by bchiou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ae1fcea8deb Add test to make sure the view transition tree is not exposed to the accessibility tree. r=morgan,view-transitions-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
Regressions: 1968217
QA Whiteboard: [qa-triage-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: