Skip to content

fix(Dropdown): updated structure for dropdown menu list item#1113

Open
ssherigar-c-eightfold wants to merge 5 commits intoEightfoldAI:mainfrom
ssherigar-c-eightfold:allyant/dropdown
Open

fix(Dropdown): updated structure for dropdown menu list item#1113
ssherigar-c-eightfold wants to merge 5 commits intoEightfoldAI:mainfrom
ssherigar-c-eightfold:allyant/dropdown

Conversation

@ssherigar-c-eightfold
Copy link
Copy Markdown
Contributor

@ssherigar-c-eightfold ssherigar-c-eightfold commented Mar 31, 2026

SUMMARY:

MenuItemButton

  • Moved interactivity from button → li (with role, tabIndex, keyboard handlers)
  • Added full keyboard support (Arrow keys, Enter/Space)
  • Simplified nested items (use span instead of button)

Dropdown

  • Removed default referenceRole='button'
  • Removed incorrect role='listbox' from overlay
  • Fixed aria-haspopup usage (supports listbox, applies correctly)
  • Role only applied when explicitly passed

List

  • Added ariaLabelledBy → maps to aria-labelledby, to allow lists to be programmatically associated with visible labels

GITHUB ISSUE (Open Source Contributors)

NA

JIRA TASK (Eightfold Employees Only):

https://eightfoldai.atlassian.net/browse/ENG-167674

CHANGE TYPE:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

TEST PLAN:

Check dropdown list items for accessibility compliance
Dropdown

  • Verify click and keyboard (Enter/Space) interactions work correctly
  • Ensure arrow keys support proper navigation between items
  • Confirm button is removed and replaced with a non-interactive element (e.g., span), with interaction handled at the parent level
  • Validate that appropriate roles are applied
  • Ensure correct use of aria-haspopup, aria-expanded, and aria-controls
  • Confirm existing ARIA attributes are preserved
  • Ensure no incorrect roles are applied to the overlay

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Mar 31, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@ssherigar-c-eightfold ssherigar-c-eightfold changed the title fix: updated structure for dropdown menu list item fix(Dropdown): updated structure for dropdown menu list item Apr 1, 2026
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.

1 participant