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

Ignore readonly autocomplete field #4721

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

eddie0329
Copy link
Contributor

<< Describe the changes >>

Closes: #4708

adding feature that autocomplete-valid rule should not fail on readonly fields.

@eddie0329 eddie0329 requested a review from a team as a code owner March 6, 2025 04:30
Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @eddie0329 Thank you so much for the contribution. While This addresses the issue, I don't think this is quite the right way to do this. The way you've done this will result in the rule passing. What I think we'd want here is for the rule to be inapplicable on readonly input elements. The way to do that is to move the check to the matches function in lib/rules/autocomplete-matches.js.

You'd then need to put a test for it in test/rule-matches/autocomplete-matches.js. We'll also want at least one E2E test to validate the result, which you can add to test/integration/rules/autocomplete-valid/autocomplete-valid.html.

Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just need a couple integration tests in test/integration/rules/autocomplete-valid/autocomplete-valid.html.

@eddie0329
Copy link
Contributor Author

@WilcoFiers Thanks for review.
I was trying to add some integration test,, but have little problem.

Command , npm run test:integration, leads me error below:

SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 131

My current chrome version is 134. Instead of down garde my original chrome version, is there any way using like virtual environment?

@straker
Copy link
Contributor

straker commented Mar 20, 2025

@eddie0329 if you run the command npx browser-driver-manager install chromedriver from the root of the axe-core directory, that should install a compatible version of chromedriver for you so you can run the integration tests.

@eddie0329 eddie0329 requested a review from WilcoFiers March 21, 2025 07:03
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.

autocomplete rule should ignore readonly fields
3 participants