Skip to content

[Bug]: ariaSnapshot hides visibility: visible inside visibility: hidden #36296

Open
@Skn0tt

Description

@Skn0tt

Version

tot

Steps to reproduce

it('repro', async ({ page }) => {
  await page.setContent(`
    <div style="visibility: hidden;">
      <div style="visibility: visible;">
        <button>Button</button>
      </div>
    </div>
  `);

  await checkAndMatchSnapshot(page.locator('body'), `
    - button "Button"
  `);
});

Expected behavior

I expect the inner button to be in the snapshot.

Actual behavior

The snapshot is empty.

Additional context

Chromium considers it visible:

Image

Maybe it's this case that we don't implement:

// Not implemented:
// `Any descendants of elements that have the characteristic "Children Presentational: True"`
// https://www.w3.org/TR/wai-aria-1.2/#aria-hidden

Environment

System:
    OS: macOS 15.5
    CPU: (12) arm64 Apple M3 Pro
    Memory: 145.89 MB / 18.00 GB
  Binaries:
    Node: 23.11.0 - ~/.local/state/fnm_multishells/12301_1749718398620/bin/node
    npm: 11.4.1 - ~/.local/state/fnm_multishells/12301_1749718398620/bin/npm
    pnpm: 10.6.5 - /opt/homebrew/bin/pnpm
  IDEs:
    VSCode: 1.100.3 - /opt/homebrew/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions