New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: page.accessibility.snapshot
throws after updating an element with aria-expanded
#9404
Comments
Looks like something has changed on the backend and |
OrKoN
added a commit
that referenced
this issue
Dec 12, 2022
OrKoN
added a commit
that referenced
this issue
Dec 12, 2022
OrKoN
added a commit
that referenced
this issue
Dec 13, 2022
Merged
colinrotherham
added a commit
to alphagov/govuk-frontend
that referenced
this issue
Dec 19, 2022
Removing workaround fixed in `puppeteer-core` * puppeteer/puppeteer#9404 * puppeteer/puppeteer#9405 This reverts commit af91aae.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
Steps to reproduce the problem:
npm install
node index.js
The script runs Puppeteer to manipulate the page in
index.html
, clicking the button to swap itsaria-expanded
attribute and updating its label. When the scripts queries the accessibility tree snapshot after clicking, thesnapshot
method throws.This is a minimal reproduction of an issue we recently had when dependabot upgraded Puppeteer from 19.3.0 to 19.4.0.
You can uncomment line 16 in
index.js
to show a possible workaround that uses anaria/
selector to wait for the accessibility tree to have been updated. Another option is to usewaitForTimeout
with the risk of flakiness it may involve depending on the timeout duration. Note that using a CSS selector (eg.[aria-expanded="true"]
) instead of thearia/
selector doesn't work around the issue.Not updating
aria-expanded
in the event handler on the page (index.html
line 30) also prevents the script from throwing.Puppeteer version
19.4.0
Node.js version
18.12.1
npm version
8.19.2
What operating system are you seeing the problem on?
macOS
Configuration file
No response
Relevant log output
The text was updated successfully, but these errors were encountered: