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

Clarify aria-autocomplete and autocomplete semantic equivalency #2337

Open
tay1orjones opened this issue Sep 18, 2024 · 3 comments · May be fixed by #2350
Open

Clarify aria-autocomplete and autocomplete semantic equivalency #2337

tay1orjones opened this issue Sep 18, 2024 · 3 comments · May be fixed by #2350

Comments

@tay1orjones
Copy link

tay1orjones commented Sep 18, 2024

Describe your concern

I've been reading through the specs regarding these two attributes and can't clearly identify if aria-autocomplete is semantically equivalent to HTML's autocomplete. I see a significant number of implementations of ComboBoxes using autocomplete="off" to instruct the browser to not use it's native autofill functionality (despite sometimes not being respected like in chrome). They additionally use aria-autocomplete="list" on the same element to convey the usage/presence of a custom listbox.

Is it an acceptable practice to use both aria-autocomplete and autocomplete on a ComboBox and other elements/widgets, or should only one of these be used?

Link to the version of the specification or documentation you were looking at at.

Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?

Yes

Related: w3c/aria-practices#639

@tay1orjones tay1orjones changed the title Clarify aria-autocomplete relationship with autocomplete attribute Clarify aria-autocomplete and autocomplete semantic equivalency Sep 18, 2024
@pkra
Copy link
Member

pkra commented Sep 18, 2024

Just to add: https://w3c.github.io/html-aam/#att-autocomplete-form says

If the element includes both autocomplete and aria-autocomplete attributes with valid values, User Agents MUST expose only the autocomplete attribute value.

@scottaohara
Copy link
Member

there is overlap, but they aren't entirely equivalent.

also from HTML AAM:

Note: the ARIA attribute and the HTML attribute have disparate features.

there may need to be some more nuance to that user agents MUST in html aam... the intent there was likely to handle situations like <input autocomplete=name aria-autocomplete=inline | none> where the aria version is implying there's an inline autocomplete (type ahead) or no autocomplete, but the HTML attribute would render the browser's popup of saved names (a an autocomplete list).

but, to the point of the OP, <input role=combobox aria-autocomplete=list autocomplete=off ...> wouldn't be right - because there we do want a list to display, just not the browser's list (though lol, some browsers still going to show their autocomplete popup regardless - regardless of if a dev or user wants it to show or not)

@philljenkins
Copy link

philljenkins commented Oct 7, 2024

The HTML Accessibility API Mappings 1.0 (W3C Editor's Draft) spec needs some editing clarification:

section on 3.6.12 autocomplete - form

  • should clarify what is applicable only to the form element, and remove the remaining confusing comments not applicable to the form element.

section on 3.6.13 autocomplete - input, select and textarea

Remove the confusing & redundant comment :"If the element includes both autocomplete and aria-autocomplete attributes with valid values, User Agents MUST expose only the autocomplete attribute value." or at least clarify which element(s) and why it should follow this convention when the ARIA attribute and the HTML attribute have disparate features. And explain what is valid (and invalid) overlap if any.

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 a pull request may close this issue.

4 participants