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

feat: bump axe core to 4.2.1 and fix unit test's failures #169

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

lpelypenko
Copy link
Contributor

Summary

  • bumped axe core to 4.2.1
  • updated snapshots

4.2.1 version has greatly improved vs 4.0.1 with major fixes and greater coverge.

I would like to start using it in our team but the old version 4.0. 1is showing false negative issues for 'button-name' and 'svg-img-alt' rules that were fixed in 4.2.1.

I would really appreciate it if this change gets merged.

@lpelypenko
Copy link
Contributor Author

Hi @NickColley ,
I would really appreciate if you consider to merge this library update and bump jest-axe.
We keep seeing the issue from axe-core old version (august 2020 version) that is just an incorrect axe core rule that was fixed before. Example(removed some real names from classes):

    Expected the HTML found at $('.test-class') to have no violations:

    <svg xmlns="swgUrl" focusable="false" role="img" fill="currentColor" viewBox="0 0 24 24" class="test-class">

    Received:

    "svg elements with an img role have an alternative text (svg-img-alt)"

    Fix any of the following:
      Element child title is empty
      aria-label attribute does not exist or is empty
      aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
      Element has no title attribute

When test-class svg has a title that fix such violation:

<svg xmlns="swgUrl" focusable="false" role="img" fill="currentColor" viewBox="0 0 24 24" class="test-class">
<title>Hide chart</title>
<path d="some correct path">
</path>
</svg>

This issue is not reproducible with axe-core 4.2.1 and the current MR would be really helpful for me to unblock usage of jest-axe.

Thank you in advance for your time!

@lpelypenko lpelypenko changed the title feat: bump axe core to 4.2.1 feat: bump axe core to 4.2.1 and fix unit test's failures May 27, 2021
@NickColley
Copy link
Owner

Running CI for this and will merge and publish as a breaking change if it succeeds. (Since new rules result in builds changing, small breaking change for some people)...

@NickColley NickColley merged commit 01c4fe5 into NickColley:main Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants