Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

feat(Tree): left and right arrow keyboard navigation #1451

Merged
merged 25 commits into from
Jun 11, 2019

Conversation

silviuaavram
Copy link
Collaborator

@silviuaavram silviuaavram commented Jun 4, 2019

Follows the ARIA design pattern https://www.w3.org/TR/wai-aria-practices-1.1/examples/treeview/treeview-1/treeview-1a.html

On Left Arrow, it should collapse tree if it is open. If it is closed, it should move focus to parent.
On Right Arrow, it should expand tree if it is closed and has subtree. If it is open, it should move focus to first child in subtree.

Also removed circular navigation provided by the FocusZone.

WIP: Unit Tests.

@silviuaavram silviuaavram added accessibility All the Accessibility tasks and bugs should be tagged with this. 🚀 ready for review labels Jun 4, 2019
@codecov
Copy link

codecov bot commented Jun 5, 2019

Codecov Report

Merging #1451 into master will increase coverage by 0.14%.
The diff coverage is 58.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1451      +/-   ##
==========================================
+ Coverage   73.45%   73.59%   +0.14%     
==========================================
  Files         806      807       +1     
  Lines        6088     6117      +29     
  Branches     1779     1785       +6     
==========================================
+ Hits         4472     4502      +30     
+ Misses       1610     1609       -1     
  Partials        6        6
Impacted Files Coverage Δ
.../accessibility/Behaviors/Tree/treeTitleBehavior.ts 100% <ø> (ø) ⬆️
...b/accessibility/Behaviors/Tree/treeItemBehavior.ts 100% <100%> (ø)
packages/react/src/components/Tree/TreeTitle.tsx 86.36% <100%> (+36.36%) ⬆️
packages/react/src/components/Tree/TreeItem.tsx 53.57% <13.33%> (-26.43%) ⬇️
packages/react/src/components/Tree/Tree.tsx 93.33% <83.33%> (+21.9%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e064a02...7b54477. Read the comment docs.

Copy link
Collaborator

@bmdalex bmdalex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@silviuaavram silviuaavram merged commit fae74b5 into master Jun 11, 2019
@delete-merged-branch delete-merged-branch bot deleted the feat-tree-navigation-left-right branch June 11, 2019 07:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility All the Accessibility tasks and bugs should be tagged with this.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants