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

autocomplete-valid with multiple values fails #4581

Closed
1 task done
emmasax opened this issue Sep 16, 2024 · 2 comments
Closed
1 task done

autocomplete-valid with multiple values fails #4581

emmasax opened this issue Sep 16, 2024 · 2 comments
Labels
ungroomed Ticket needs a maintainer to prioritize and label

Comments

@emmasax
Copy link

emmasax commented Sep 16, 2024

Product

axe-core

Product Version

4.10.0

Latest Version

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

Issue Description

Expectation

Setting the value of autocomplete with a space separated list should pass the tests

Actual

Only a single value passes

How to Reproduce

Fail

<label for="searchTextInput">Enter postcode, town or city*</label>
<input autocomplete="street-address postal-code" id="searchTextInput" aria-required="true" aria-label="Enter postcode, town or city" minlength="2"  type="text" value="" name="searchValue" />

Pass

<label for="searchTextInput">Enter postcode, town or city*</label>
<input autocomplete="postal-code" id="searchTextInput" aria-required="true" aria-label="Enter postcode, town or city" minlength="2" type="text" value="" name="searchValue" />

Pass

<label for="searchTextInput">Enter postcode, town or city*</label>
<input autocomplete="street-address" id="searchTextInput" aria-required="true" aria-label="Enter postcode, town or city" minlength="2" type="text" value="" name="searchValue" />

Additional context

@emmasax emmasax added the ungroomed Ticket needs a maintainer to prioritize and label label Sep 16, 2024
@WilcoFiers
Copy link
Contributor

@emmasax Using values like this isn't valid HTML. Since it sounds like this isn't necessarily about user data it would be better to remove autocomplete from the field.

The accessibility issue here seems minor. This rule tests a WCAG criterion which was intended to allow people to add custom styles, such as adding an icon to certain fields to allow people to more easily understand their purpose. Giving the field multiple values like this can result in multiple such styles being applied.

As far as I'm aware assistive technologies like this aren't widely available / used, so this is more a potential future problem than a real problem today. Still you're probably best removing the autocomplete attribute from that field.

@emmasax
Copy link
Author

emmasax commented Sep 24, 2024

you're probably best removing the autocomplete attribute from that field.

agreed! i'll close this.

@emmasax emmasax closed this as completed Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ungroomed Ticket needs a maintainer to prioritize and label
Projects
None yet
Development

No branches or pull requests

2 participants