Skip to content

Add option to add aria-label attribute#375

Open
th3c0r wants to merge 3 commits into
TarekRaafat:masterfrom
th3c0r:add_aria_label
Open

Add option to add aria-label attribute#375
th3c0r wants to merge 3 commits into
TarekRaafat:masterfrom
th3c0r:add_aria_label

Conversation

@th3c0r
Copy link
Copy Markdown

@th3c0r th3c0r commented Oct 2, 2022

Allow the users to add the aria-label option to the wrapper if wrapper exists, or to the main input element.

This fix the issue #372

@th3c0r
Copy link
Copy Markdown
Author

th3c0r commented Oct 5, 2022

In the latest commit 7a6dcf0 my IDE in auto formatting make some changes in spaces, lines or convert asterisks to hyphen. I will be back with the fix to keep only the change to the document I want to apply about ariaLabel.

@TarekRaafat
Copy link
Copy Markdown
Owner

TarekRaafat commented Apr 13, 2026

Hello @th3c0r,

I apologize for my very delayed reply on this one.

Good catch! Accessibility is a top priority for autoComplete.js, and adding support for aria-label is a valuable addition. Your implementation is clean, and the approach of applying it to the wrapper when available or falling back to the input makes sense.

I have this on my radar and will be addressing it as part of the upcoming v11 release, where accessibility is getting a broader overhaul. Your PR will be used as a reference for this specific improvement.

I will be publishing the v11 release plan soon, so stay connected for updates.

Thanks for your valuable contribution, much appreciated!

Have a nice day, cheers! :)

@robbiegod
Copy link
Copy Markdown

robbiegod commented Apr 28, 2026

@TarekRaafat Thank you for taking a look at the issue I originally submitted and @th3c0r created the solution for it. We appreciate it. Thank you! 508 is very important and anyway we can make the web more accessible the better for everyone!

With all of that said, do you think there is any possibility to get this merged into v10 ? I originally reported this 4 yrs ago so would love it if we could get this into the version that we are using now.

@TarekRaafat
Copy link
Copy Markdown
Owner

Hello @robbiegod,

Thanks for following up on this, and apologies for any confusion from my earlier comment.

Good news on both fronts. The ariaLabel support from #375 is already in the next v10 release (v10.3.0) currently in progress, alongside a wider accessibility pass:

  • ariaLabel (top-level) sets aria-label on the wrapper, or on the input when the wrapper is disabled
  • resultsList.ariaLabel sets aria-label on the listbox, defaults to "Results"
  • A visually hidden aria-live="polite" region announcing result count changes to screen readers
  • A new error event for cleaner failure handling

So you will not need to wait for v11 to get this. The v10.3.0 release is close, and the broader WAI-ARIA 1.2 combobox compliance work will then continue into v11.

You can track the full plan here: ROADMAP.md

Thanks for following up on this and for your patience over the years, it really does mean a lot. Accessibility is a top priority for autoComplete.js and contributions and feedback like yours are what keep moving it forward.

508 is very important, fully agreed, and the more we can push accessibility forward together the better.

Have a nice day, cheers! :)

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.

3 participants