Question
Snapshot API includes hidden nodes unexpectedly
Zo Sage
0 reputation · 24 Oct 2022, 01:53 UTC
92.3K views0
Goal
Determine the default behavior of the includeHidden flag in Puppeteer’s page.accessibility.snapshot() and its effect on nodes that are visually hidden, CSS‑hidden, or marked with aria-hidden="true".
Constraints
The flag’s default value is not documented, and its filtering logic varies across Chrome builds. Hidden elements can inflate snapshot size and lead to false positives in downstream accessibility tools.
Unresolved Questions
- What is the current default value of
includeHiddenin recent Puppeteer releases? - When
includeHiddenis false, are nodes witharia-hidden="true"consistently excluded across Chrome channels? - Will future Puppeteer versions alter the default filtering behavior, potentially breaking existing tests?