-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TreeView: Implement arrow key navigation (#2331)
* Add TreeView docs * Update TreeView props * Scaffold treeview markup * Add TreeView to drafts * Add comment * Track item levels * Add TreeView stories * Update TreeView docs * Update TreeView markup * Create curly-birds-argue.md * Fix examples * Update src/TreeView/TreeView.tsx * Update docs/content/TreeView.mdx * Add some tests * Implement arrow key navigation * Fix arrow left * Set up aria-activedescendant Co-authored-by: Eric Bailey <ericwbailey@users.noreply.github.com> * Display focus ring on active descendant * Use arrow key to change active descendant * Handle expand/collapse with arrow keys * Fix lint error * Add up and down arrow key test * Prevent default when moving focus with arrow keys * Open links in same tab by default * Add test for right arrow key expand * Add defaultExpanded prop * Test left arrow key collapse * Reorganize tests * Create neat-squids-cheat.md * Add more tests * Implement home and end key behavior * Update active descendant on click * Remove focus state * Remove focus state from context * Test enter and space keys * Update focus style * Remove Space key behavior * Wrap test cases with themeprovider * Add test for link item * Update urls Co-authored-by: Eric Bailey <ericwbailey@users.noreply.github.com>
- Loading branch information
1 parent
4a40085
commit 31b8804
Showing
5 changed files
with
944 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": patch | ||
--- | ||
|
||
Adds support for arrow key navigation of a TreeView using `aria-activedescendant` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.