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

Space in text is causing failure in color-contrast test #4555

Open
1 task done
ivoderuever opened this issue Aug 7, 2024 · 3 comments
Open
1 task done

Space in text is causing failure in color-contrast test #4555

ivoderuever opened this issue Aug 7, 2024 · 3 comments
Labels
color contrast Color contrast issues fix Bug fixes

Comments

@ivoderuever
Copy link

Product

axe-core

Product Version

4.9.0

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Expectation

I expect te return of the failing elements.

Actual

It throws the following error: Error: Cannot read properties of undefined (reading 'getCellFromPoint')

How to Reproduce

By running the mobile lighthouse on https://www.custtom.com/ you'll see the same error come up under accessibility.

Additional context

It only returns an error when in the mobile menu you press a sub menu (products for example) and then if those li elements contain words with spaces it returns the error in lighthouse. If I put a single word there it will return as expected.
Additionally I did not see this error with the axe extension.

@ivoderuever ivoderuever added the ungroomed Ticket needs a maintainer to prioritize and label label Aug 7, 2024
@straker
Copy link
Contributor

straker commented Aug 7, 2024

Thanks for the issue.

So the quick answer is that the error is caused by the hamburger menu on mobile that is offscreen. It's not hidden from screen readers (or tab) so the color contrast algorithm tries to run on it, but that breaks. A quick fix would be to hide the menu which would prevent the code from running.

There's still a bug on our end though so I'll log this as a bug that needs fixing. A note for future self is that the menu container that is offscreen does not have an associated _grid with it but the child anchor does, so the code breaks when trying to look at the grid.container of the anchor, see's it exists, but then that container does not have a ._grid property.

@straker straker added fix Bug fixes color contrast Color contrast issues and removed ungroomed Ticket needs a maintainer to prioritize and label labels Aug 7, 2024
@ivoderuever
Copy link
Author

Thank you for looking into the issue.

I've adjusted things on our end based on your comment and lighthouses is running as normal again. So again thank you.

@nicokiva-sierrainteractive

Hi @straker, I think I have the same issue but not sure (a drawer translateY -105%) to hide it. That offscreen may cause this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color contrast Color contrast issues fix Bug fixes
Projects
None yet
Development

No branches or pull requests

3 participants