Skip to content
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

Question: How to checkA11y in an iframe #79

Open
yanbxice opened this issue Dec 10, 2021 · 4 comments
Open

Question: How to checkA11y in an iframe #79

yanbxice opened this issue Dec 10, 2021 · 4 comments
Labels

Comments

@yanbxice
Copy link

I think this would be more of a question ask than an issue report. I couldn't find answers by searching online so would like to get some help here.

I have a component inside an iframe and I need to check if there is any a11y violations for that component. Now I can get the iframe using the below code, but looks like I can't pass it in to checkA11y function as the context, because it's not the type of ElementContext. Is a11y checking supported for elements inside iframes? What should be the correct way to do it?
const iframe = await page.frame({url: xxxxxx});
await checkA11y(page, iframe, options);

@abhinaba-ghosh
Copy link
Owner

Hi @yanbxice , thanks for raising the issue. I will take a look over the upcoming weekend.

@harir5
Copy link

harir5 commented Apr 5, 2022

Hi @abhinaba-ghosh - our application uses frames and iframes extensively. it would be beneficial to have this feature since some content that resides within the frame/iframe has to be A11y checked as well.

@william-fleming
Copy link

william-fleming commented Jun 1, 2023

Hi there! Has a solution to this been solved for or is this not a natively supported functionality? Thank you!

For a workaround, I did find I was able to accomplish this by passing the Frame (not FrameLocator) to the injectAxe and checkA11y functions. These functions utilize the evaluate method of the object passed in which is available via the Frame.

@abhinaba-ghosh
Copy link
Owner

@william-fleming would you mind sharing an example for the workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants