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

Upgrade aria-query to version 5.2.1 #1239

Closed
MatanBobi opened this issue Jun 14, 2023 · 5 comments · Fixed by #1241
Closed

Upgrade aria-query to version 5.2.1 #1239

MatanBobi opened this issue Jun 14, 2023 · 5 comments · Fixed by #1241
Labels
aria-query An issue related to aria-query enhancement New feature or request

Comments

@MatanBobi
Copy link
Member

Describe the feature you'd like:

aria-query has released a new version yesterday which caused some regression on our end.
At the moment, we've pinned the version to prevent issues, we need to upgrade it soon to be compliant with the new ARIA spec changes.
Affected issues that were closed in the meantime because we've pinned the version:
#1235
#1238

Teachability, Documentation, Adoption, Migration Strategy:

We need to upgrade locally, see which tests are failing and why, if aria-query has issues, we need to open issues in their repo.

@philer-jambit
Copy link

philer-jambit commented Jun 19, 2023

The current pin (aria-query: 5.1.3) causes some of our tests to fail, in particular:

  • an <input type"text" list="my-options" … /> which references a <datalist id="my-options"> is no longer accessible as role="textbox" but role="combobox" instead
  • an <input type="date" /> which was previously accessible as role="textbox" now has no role at all.

Note that we are using @testing-library/cypress, which still uses the outdated @testing-library/dom version ^8.1.0.

As a temporary workaround we have pinned "@testing-library/dom": "8.20.0" in our dependencies.

@MatanBobi
Copy link
Member Author

MatanBobi commented Jun 20, 2023

Hi @philer-jambit, thanks for posting this.
The behavior you're seeing in 5.1.3 is correct and follows the spec so you'll probably need to adapt your tests:

  1. An input with type="text" and a list attribute should be accessible through role="combobox":
image
  1. Input type="date" has no corresponding implicit role:
image

More about this can be found in the ARIA spec.
Thanks again!

@philer-jambit
Copy link

Good to know, thanks! 👍

I have to say, date inputs not having any role of their own and the spec forbidding adding a role is quite impractical. Firefox's accessibility inspector actually calls it date editor, but evidently that is non-standard. For lack of a better idea I've now resorted to data-testid.

@cmorten
Copy link

cmorten commented Jun 24, 2023

A new version https://www.npmjs.com/package/aria-query/v/5.3.0, it would be good to see if this resolves the issues with 5.2.1

@MatanBobi
Copy link
Member Author

🎉 This issue has been resolved in version 10.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aria-query An issue related to aria-query enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants