#562: Add accessible reorder option in column menu [new]#984
Merged
notsidney merged 4 commits intorowyio:developfrom Nov 28, 2022
Merged
#562: Add accessible reorder option in column menu [new]#984notsidney merged 4 commits intorowyio:developfrom
notsidney merged 4 commits intorowyio:developfrom
Conversation
|
@iamanishroy is attempting to deploy a commit to the Rowy Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
notsidney
approved these changes
Nov 28, 2022
Contributor
notsidney
left a comment
There was a problem hiding this comment.
Thanks @iamanishroy, this looks good to me. It looks like you had to read the docs of https://github.com/rowyio/multiselect to implement this as well, so thanks for being diligent.
A note on extending this menu in the future
This was built with the MultiSelect component, which was designed specifically for multiple selection. Adding more functionality like this would be better served by not using MultiSelect for this anymore.
There are two “hacks” that have been needed to implement this feature:
- Create a new
dragDisabledstate to track if the user has input anything in the search box. This is done by tracking theonInputevent. This should be derived from the state of that input’s value, but this is intentionally not accessible in the MultiSelect component. - There are two paths to access items with the keyboard. When the input is focused, the user can press the arrow keys to select columns to be hidden. This is consistent with the WAI-ARIA guidelines implemented by the MUI Autocomplete component, on which this component is based.
But to reorder columns, the user must press Tab to select each individual column. This also makes the “Clear” and “Done” buttons less accessible, as previously they only had to Tab once to get to them, but must now go through all columns.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#562: Add accessible reorder option in column menu.
Worked on this improvement.
I have used react-beautiful-dnd as recommended.
Linked to PR #983 -> created because of some issue with branch.