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

When visiting a link containing a targeted hash component, the select is opened #771

Open
igneosaur opened this issue Feb 25, 2025 · 1 comment

Comments

@igneosaur
Copy link

igneosaur commented Feb 25, 2025

If a link is navigated to that contains a hash that targets the autocomplete component, the component is opened. The behaviour cannot be seen if navigating within the same page but navigation from another location will open the dropdown.

This is a pretty low-level bug but our testers noticed this during accesibility testing and the behaviour diverges from the default select element behaviour, which is to focus but not open.

Steps to reproduce

Visit the following link https://alphagov.github.io/accessible-autocomplete/examples/#autocomplete-defaultValue.

Observe that the select box is not only focussed (expected) but opened (not expected).

@igneosaur
Copy link
Author

I might be able to get to this and have a little poke around but thought I'd make this issue to track it and to maybe start a discussion if there is any relevant knowledge about.

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

No branches or pull requests

1 participant