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

For Katerina: beginnings of drag/drop accessibility enhancements #6626

Closed
wants to merge 2 commits into from

Conversation

nicolethoen
Copy link
Contributor

My approach/plan:

  • If the Draggable item has no interact-able elements within it, then it does not need a drag button because we can put a tab index on the Draggable item to allow the user to put focus on the item. If it does have interact-able elements within it - such as a button or dropdown or link - then the tab index would go on a DragButton component, which is basically just a button with the drag icon that will consume a context passed down from the Draggable item. The consumer would need to manually add the DragButton to each Draggable item in that case.
  • In order to take advantage of all the logic associated with animating everything correctly and applying the correct styles at the right times, I tried to invoke the mouse events from within the keyboard events. I'm only midway through that attempt so it's definitely very messy.
  • The current Draggable component (before I started messing with it) used a lot of instance variables rather than state management to pass crucial information between the various even handlers. That is currently one of the most difficult things to incorporate into the keyboard handling. I've tried to refactor it so that event handlers are passing crucial information around via function parameters instead - but now everything feels very tangled and I need to sort it out.
  • so far, you can use the keyboard to begin dragging an item (without a drag button), but I have not figured out how to drop that item correctly yet, and I have not yet tried to figure out how to move the dragging item very far. There's a lot let to work on

I have no begun to think about screen reader usage. I think that may need to be a follow up issue. The largest hurdle I see there is that screen readers rely heavily on click events, and our drag/drop component uses mouseup/mousedown events so it may not translate naturally based on our current approach.

@patternfly-build
Copy link
Contributor

@stale
Copy link

stale bot commented Jan 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jan 17, 2022
@stale stale bot closed this Jan 31, 2022
@nicolethoen nicolethoen deleted the drag_drop_a11y branch February 8, 2023 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants