Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
271 stars 75 forks source link

Unexpected keyboard navigation experience with nested trees #6861

Closed SaraLawrence closed 10 months ago

SaraLawrence commented 1 year ago

Summary

Questioning the use of nested trees and the effect on keyboard only users. Also, wondering why slots are implemented at the tree-item level rather than at the tree level?

Actual Behavior

Keyboard only users expect to be able to navigate between nodes with the up and down arrow keys and also move into a group of children using the down arrow. It is confusing to have to first press right or left arrow in order to move up or down.

Also, screen reader support for trees is not consistent and implementing them as a series of trees when visually they appear to be one component, can be confusing for blind screen reader users.

Example: JAWS only recognizes two of the four patterns in the sample codepen:

Tree views in JAWS list view

Expected Behavior

All of the W3C and Deque examples use role="group" to contain child items, rather than nesting trees and the keyboard behavior is more straightforward.

Reproduction Sample

https://codepen.io/paulcp/pen/GRYjaoY

Reproduction Steps

  1. Tab onto first tree-item "Grandfather"
  2. Use right-arrow to expand
    • I would expect to use the down arrow to move down to Father at this point but right-arrow is required (In all the examples on W3C and Deque U, you can use either the right-arrow or the down-arrow at this point.)
  3. Once focus is on "Father", expand
    • Once expanded, I would expect to use down-arrow to move to "Sister", but right-arrow is required.
    • Down-arrow is only available to move to items with no children and this does not follow the expected keyboard pattern for tree.
  4. Set focus on "Sister"
    • As a screen reader user I would assume I need to use right-arrow again since that's the only key that enabled me to continue moving down the tree but now only down-arrow is available for that action.

Reproduction Version

1.2.0

Working W3C Example/Tutorial

See Expected Behavior

Relevant Info

Windows 10, Chrome, JAWS, NVDA

Regression?

No response

Priority impact

p3 - want for upcoming milestone

Esri team

ArcGIS Online

geospatialem commented 1 year ago

Per our Teams discussion, adding the needs more info label for additional repro steps to be added shortly.

SaraLawrence commented 1 year ago

@geospatialem Added more to reproduction steps

geospatialem commented 1 year ago

Thanks @SaraLawrence! Reorganized content a bit in the above description. Updates will be posted on next steps once triaged.

geospatialem commented 1 year ago

Research will be conducted in an upcoming milestone prior to assigning to developers.

geospatialem commented 11 months ago

Anticipated keyboard behavior (with and without AT active):

Tab method refactor (getRootTabIndex private method?):

keyDownHandler keyboard event refactor:

W3C example gif:

expected-keyboard-navigation-tree

geospatialem commented 11 months ago

Reallocating the target to the August milestone for the development effort.

github-actions[bot] commented 10 months ago

Installed and assigned for verification.

geospatialem commented 10 months ago

Verified in 1.7.0-next.13 with the criteria above ☝🏻