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

Dropdown has incorrectly nested <ul> and <li> elements. #735

Open
danielck opened this issue May 30, 2023 · 0 comments
Open

Dropdown has incorrectly nested <ul> and <li> elements. #735

danielck opened this issue May 30, 2023 · 0 comments

Comments

@danielck
Copy link
Contributor

Expected Behavior or Possible Solution

The Dropdown component contains a ul with role="listbox". The expectation for the native HTML element is that direct descendants of the element should be li elements. The expectation for the listbox role is that direct descendants should have role="option".

Actual Behavior and Screenshots

Current structure has an additional div within the hierarchy:

<ul role="listbox">
   <div>
      <li role="option">

Specifications

Suggested fix

Remove the extra div. Also semantically the use of ul and li have no meaning because they are overridden using the role attribute, so an alternative option is to move the role=listbox to the offending div.

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