microsoft / microsoft/playwright

[Bug]: `toMatchAriaSnapshot` does not respect `ElementInternals`

Open
#34,264 7 comments 16 reactions 1 assignee View on GitHub

@pavelfeldman is already working on this.

Since Jan 9, 2025.

P3-collecting-feedback
Dominant language
TypeScript
Stars
96.4k
Forks
6.5k
Avg merge
1d 6h
Merged PRs (30d)
180

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.