Skip to content

[Bug]: Tom select should copy aria-label attribute to its cloned element #908

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

Open
richieri opened this issue Apr 9, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@richieri
Copy link

richieri commented Apr 9, 2025

Bug description

When you apply tom-select to an input that has an aria-label attribute, it does not copy that attribute to the newly created element. This causes Screen readers to not correctly "speak" the field purpose.

Expected behavior

The element that is created by tom-select should carry the aria-label attribute over.

Steps to reproduce

  • Create a simple input element with aria-label:

<input id="test" aria-label="Test description" />

  • Add TomSelect to it:

new TomSelect("#test");

You will see that aria-label is not copied to the new element.

Additional context

  • Browser Chrome
@richieri richieri added the bug Something isn't working label Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant