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

ul role=listbox should define an aria-label or aria-labelledby #478

Closed
fcabreraupgrade opened this issue Jan 6, 2021 · 2 comments
Closed

Comments

@fcabreraupgrade
Copy link

Short description

I couldn't define aria-label / aria-labelledby on the item with role=listbox.

For an example of listbox behavior I'm following this example.

As an extra I found defining an accessible name is required for role=listbox aria-docs.

Expected results

We should be able to define props for the element with role=listbox.

Impacted code

https://github.com/ubilabs/react-geosuggest/blob/master/src/suggest-list.tsx#L70-L74

@Borrisson
Copy link
Contributor

Borrisson commented Jul 5, 2021

Also to add to this issue.

if an initialValue is passed, the <ul> has no <li role="option"> child. If possible either make a conditional where if there are no <li> to list then do not render the ul element.

<div class="geosuggest__suggests-wrapper"><ul class="geosuggest__suggests geosuggest__suggests--hidden" role="listbox" id="geosuggest__list"></ul></div>

@joaogarin
Copy link
Contributor

Opened a PR for this issue, appreciate any feedback 👍

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

4 participants