EightfoldAI / octuple

The Octuple component library
MIT License
16 stars 45 forks source link

feat: a11y: arrow key navigation support for list menu dropdown and select #759

Closed dkilgore-eightfold closed 6 months ago

dkilgore-eightfold commented 6 months ago

SUMMARY:

This change adds ArrowDown, ArrowLeft, ArrowRight, and ArrowUp keyboard navigation support to address existing usability bugs in List, Dropdown, Menu, CascadingMenu, and Select components.

https://github.com/EightfoldAI/octuple/assets/99700808/55067a16-a82a-4cd5-af1f-f60bf8014bc7

GITHUB ISSUE (Open Source Contributors)

https://github.com/EightfoldAI/octuple/issues/757

JIRA TASK (Eightfold Employees Only):

ENG-72532 ENG-72534 ENG-72536

CHANGE TYPE:

TEST COVERAGE:

TEST PLAN:

Pull the PR branch and yarn and then yarn storybook. Verify the List, Dropdown, Menu, and Select stories behave as expected.

codesandbox-ci[bot] commented 6 months ago

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.

Latest deployment of this branch, based on commit a975b2ab4185954107386358d3ceb14f95aae31d:

Sandbox Source
React Configuration
codecov[bot] commented 6 months ago

Codecov Report

Attention: 40 lines in your changes are missing coverage. Please review.

Comparison is base (3791c41) 85.06% compared to head (a975b2a) 85.17%.

Files Patch % Lines
src/components/List/List.tsx 86.90% 11 Missing :warning:
src/components/Menu/CascadingMenu.tsx 79.59% 10 Missing :warning:
src/components/Dropdown/Dropdown.tsx 83.72% 7 Missing :warning:
...ts/Menu/MenuItem/MenuItemButton/MenuItemButton.tsx 90.47% 4 Missing :warning:
...onents/Menu/MenuItem/MenuItemLink/MenuItemLink.tsx 78.94% 4 Missing :warning:
src/components/Menu/Menu.tsx 0.00% 2 Missing :warning:
...ts/Menu/MenuItem/MenuItemCustom/MenuItemCustom.tsx 80.00% 1 Missing :warning:
src/components/Select/Select.tsx 96.42% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #759 +/- ## ========================================== + Coverage 85.06% 85.17% +0.10% ========================================== Files 908 908 Lines 18920 19113 +193 Branches 6987 7075 +88 ========================================== + Hits 16095 16279 +184 - Misses 2743 2752 +9 Partials 82 82 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.