Skip to content

[Bug]: toMatchAriaSnapshot does not respect ElementInternals #34264

Open
@mrginglymus

Description

Version

1.49.1

Steps to reproduce

https://github.com/mrginglymus/pw-asei

This repo contains a custom element that sets role to heading on its ElementInternals instance.

Inspecting this element in chromiums accessibility tree shows that it has seen it as a heading:

Image

Expected behavior

Test in repo to pass

Actual behavior

Test in repo does not detect element as heading.

Additional context

No response

Environment

System:
    OS: Windows 10 10.0.19045
    CPU: (24) x64 Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz
    Memory: 26.72 GB / 63.80 GB
  Binaries:
    Node: 22.12.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 4.6.0 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Bash: 5.1.16 - C:\WINDOWS\system32\bash.EXE
  npmPackages:
    @playwright/experimental-ct-react: ^1.49.1 => 1.49.1

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions