Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add keyboard navigation #225

Merged
merged 77 commits into from
May 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f6358a9
feat: Test try a11y in test with axe
ellinge Mar 24, 2019
a8d1fd9
fix: Initial commit (non working)
Mar 25, 2019
7ff51d2
fix: Working keyboard navigation
Mar 27, 2019
8d10c1d
fix: Backspace only on empty search
ellinge Mar 27, 2019
244a573
fix: Adjust code to check codeclimate
ellinge Mar 28, 2019
67dc346
fix: Refactored some parts to utils
ellinge Mar 28, 2019
b336ce0
fix: Refactored some parts to utils
ellinge Mar 28, 2019
301ae28
fix: Code refactoring
Mar 28, 2019
221782a
Merge branch develop
Mar 28, 2019
61d8699
fix: Add documentation
Mar 28, 2019
c7c9bf3
fix: Refactor
Mar 28, 2019
0d47f9c
fix: Refactor
Mar 28, 2019
d35e7a8
fix: Refactor
Mar 28, 2019
bd1b120
fix: Refactor
ellinge Mar 28, 2019
366d639
fix: Refactor
ellinge Mar 28, 2019
0b4804c
Merge branch 'develop' of https://github.com/ellinge/react-dropdown-t…
ellinge Mar 31, 2019
278d166
fix: Add to typings
ellinge Mar 31, 2019
766311b
fix: Close on Enter
Apr 1, 2019
dd91e5d
fix: Refactor
Apr 1, 2019
05be4df
fix: Added test
Apr 1, 2019
2650381
fix: Added some aria
Apr 1, 2019
2109269
fix: Add label option
Apr 1, 2019
a823d00
fix: Render until node on pagedown
Apr 1, 2019
261a7c1
fix: More tests added and fix pagedown on large search result
ellinge Apr 1, 2019
e0632a2
fix: Add a11y tests
ellinge Apr 1, 2019
101fd86
fix: Modify output on violations
ellinge Apr 1, 2019
dd651d9
fix: Code smells
ellinge Apr 1, 2019
e1bb15b
fix: Updated doc and center scrollIntoView, fix hasMore()
Apr 2, 2019
5d3ecae
fix: Trigger on*-events properly, only open for chars and whitelist
Apr 2, 2019
c67cd7d
fix: Skip som aria in this branch
Apr 2, 2019
dd1550e
fix: Add tests and fix snapshot
Apr 2, 2019
0ff9de1
fix: Add tests and fix snapshot
Apr 2, 2019
0f54397
Merge branch 'develop' into feat/#216
ellinge Apr 2, 2019
41d42f8
Merge branch 'develop' into feat/#216
ellinge Apr 3, 2019
e5362c2
fix: Enabled by default
Apr 3, 2019
69f8dff
fix: Avoid scroll of whole page, only dropdown
Apr 3, 2019
84817d0
fix: Remember focus during prop updates
Apr 3, 2019
4a1c317
fix: Delete unintentional dist-file
Apr 3, 2019
4e92fff
fix: Do not select readOnly/disabled
Apr 3, 2019
edf1941
fix: Switch to babel-plugin-transform-runtime instead
ellinge Apr 4, 2019
ea334bd
fix: Add label to trigger as well
ellinge Apr 4, 2019
1c83535
fix: Highlight tag on focus, ad aria-labels
ellinge Apr 4, 2019
cb9667a
fix: Highlight tag on focus, ad aria-labels
ellinge Apr 4, 2019
20d2912
fix: Update snapshots, match default
ellinge Apr 4, 2019
0f4e80c
fix: Allow navigate to disabled/readonly
ellinge Apr 4, 2019
a1bb723
fix: Code review/smells fixes
ellinge Apr 5, 2019
5f7d4d4
fix: Code smell
ellinge Apr 5, 2019
866b3ec
fix: Code smell
ellinge Apr 5, 2019
16fd660
fix: Move to a11y-folder, shared onKeyDown test method
ellinge Apr 5, 2019
cade203
fix: Build error and tabIndex
ellinge Apr 6, 2019
66d6f68
fix: Set new focus after delete
ellinge Apr 6, 2019
c05fc74
fix: Code climate
ellinge Apr 6, 2019
799ff39
fix: Code climate
ellinge Apr 6, 2019
3a33ef9
fix: Select on tab for simpleSelect
ellinge Apr 6, 2019
e24c988
fix: Add more tests
ellinge Apr 6, 2019
8c43e81
fix: Add prop for setting remove aria-label
ellinge Apr 7, 2019
b21ae44
fix: Code climate
ellinge Apr 7, 2019
4db535f
fix: Add typing for labelRemove
Apr 8, 2019
62672dc
fix: Adjust timeout
ellinge Apr 10, 2019
4493b48
style: Bring prettier manually to reduce conflicts
mrchief Apr 14, 2019
a743931
Merge remote-tracking branch 'upstream/develop' into feat/#216
mrchief Apr 14, 2019
85f17fa
fix: Prettier and removed comment
ellinge Apr 14, 2019
a4fc033
fix: Added migration guide
ellinge Apr 14, 2019
4256ce2
fix: Bundle text props
ellinge Apr 15, 2019
6aa4beb
fix: Typing errors
ellinge Apr 15, 2019
4145f8c
fix: Renamed prop
ellinge Apr 15, 2019
72dfa23
Revert "fix: Renamed prop"
ellinge Apr 17, 2019
b3bd333
Revert "fix: Typing errors"
ellinge Apr 17, 2019
0191179
Revert "fix: Bundle text props"
ellinge Apr 17, 2019
f3060ba
Revert "fix: Added migration guide"
ellinge Apr 17, 2019
87cad68
Merge devlop into 'feat/#216'
ellinge Apr 18, 2019
244e239
fix: Validate radioSelect also
ellinge Apr 20, 2019
11513e8
fix: Moved around methods
ellinge Apr 20, 2019
3d300f4
Merge branch 'develop' into feat/#216
mrchief Apr 22, 2019
23e50f8
Merge remote-tracking branch 'upstream/develop' into feat/#216
mrchief Apr 24, 2019
66d662c
refactor: Separate out test utils from exported ones
mrchief Apr 24, 2019
5edbc88
refactor: Use ES6 getter instead of custom method for accessing tags
mrchief Apr 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"presets": [["es2015", { "modules": false }], "stage-0", "react"],
"plugins": ["transform-class-properties"],
"plugins": [
"transform-class-properties",
["transform-runtime", { "polyfill": false, "regenerator": true }]
],
"env": {
"test": {
"presets": ["es2015", "stage-0", "react"],
Expand Down
11 changes: 5 additions & 6 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ plugins:
javascript:
mass_threshold : 50
exclude_patterns:
- 'docs/'
- 'snapshots/'
- '**/tests/*'
- '**/node_modules/'
- '**/*.test.js'
- 'postcss.config.js'
- "docs/"
- "snapshots/"
- "**/tests/*"
- "**/node_modules/"
- "**/*.test.js"
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ A lightweight and fast control to render a select component that can display hie
- [showDropdownAlways](#showDropdownAlways)
- [form states (disabled|readOnly)](#formstates)
- [id](#id)
- [label](#label)
- [labelRemove](#labelRemove)
- [Styling and Customization](#styling-and-customization)
- [Using default styles](#default-styles)
- [Customizing with Bootstrap, Material Design styles](#customizing-styles)
Expand All @@ -65,6 +67,7 @@ A lightweight and fast control to render a select component that can display hie
- [Search debouncing](#search-debouncing)
- [Virtualized rendering](#virtualized-rendering)
- [Reducing costly DOM manipulations](#reducing-costly-dom-manipulations)
- [Keyboard navigation](#keyboard-navigation)
- [FAQ](#faq)
- [Doing more with HOCs](/docs/HOC.md)
- [Development](#development)
Expand Down Expand Up @@ -363,6 +366,18 @@ Specific id for container. The container renders with a default id of `rdtsN` wh

Use to ensure a own unique id when a simple counter is not sufficient, e.g in a partial server render (SSR)

### label

Type: `string`

Adds `aria-labelledby` to search input when input starts with `#`, adds `aria-label` to search input when label has value (not containing '#')

### labelRemove

Type: `string`

The text to display for `aria-label` on tag delete buttons which is combined with `aria-labelledby` pointing to the node label. Defaults to `Remove`

## Styling and Customization

### Default styles
Expand Down Expand Up @@ -414,6 +429,12 @@ Once you import default styles, it is easy to add/override the provided styles t
- [With Bootstrap](/docs/examples/bootstrap)
- [With Material Design ](/docs/examples/material)

## Keyboard navigation

Adds navigation with `arrow` keys, `page down/up` / `home/end` and toggle of selection with `enter`. `Arrow/page up/down` also toggles open of dropdown if closed.

To close open dropdown `escape` or `tab` can be used and `backspace` can be used for deletion of tags on empty search input.

## Performance

### Search optimizations
Expand Down
Loading