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

[DropZone] Change DOM order of Visually hidden input in order to focus it before its children #4219

Merged
merged 2 commits into from
May 20, 2021

Conversation

husshegz
Copy link
Contributor

@husshegz husshegz commented May 20, 2021

WHY are these changes introduced?

We have a use-case where there is a Button inside the dropzone

Currently, if we're navigating (tabbing) through the component with the keyboard:

  1. Button inside Dropzone is focused first
  2. Dropzone is focused

We expect a meaningful order when navigating through. Expected order:

  1. Focus the Dropzone first
  2. Then any focusable contents inside it
Current
Tabbing.order.mp4
Correct order
correct.order.mp4

WHAT is this pull request doing?

Changes DOM order to accommodate a meaningful tabbing sequence.

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

Could this possibly break anything from the consumer side ?

🎩 checklist

  • Tested on mobile
  • Tested on multiple browsers
  • Tested for accessibility
  • Updated the component's README.md with documentation changes
  • Tophatted documentation changes in the style guide
  • For visual design changes, pinged one of @ HYPD, @ mirualves, @ sarahill, or @ ry5n to update the Polaris UI kit

@github-actions
Copy link
Contributor

github-actions bot commented May 20, 2021

size-limit report

Path Size
cjs 141.84 KB (+0.01% 🔺)
esm 95.44 KB (-0.01% 🔽)
esnext 138.7 KB (-0.01% 🔽)
css 33.77 KB (0%)

@jared-fanning jared-fanning self-requested a review May 20, 2021 17:58
@jared-fanning
Copy link

awesome, thanks for addressing this @husshegz 👍

@husshegz
Copy link
Contributor Author

@jared-fanning
Let me know if this needs more changes, tests, story edit. I couldn't come up with any relevant examples.

Also should I update the UNRELEASED before or after approval ?

@kyledurand
Copy link
Contributor

Also should I update the UNRELEASED before or after approval ?

I think it makes sense to add a note for this. I'll approve when it's been added just ping me 👍

@husshegz husshegz requested a review from kyledurand May 20, 2021 18:22
@husshegz
Copy link
Contributor Author

@kyledurand Should be good now

Copy link
Contributor

@kyledurand kyledurand left a comment

Choose a reason for hiding this comment

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

👍 Thanks!

@husshegz husshegz merged commit 5fa7b24 into main May 20, 2021
@husshegz husshegz deleted the change-dropzone-input-for-better-focus-order branch May 20, 2021 20:12
@ghost
Copy link

ghost commented May 20, 2021

🎉 Thanks for your contribution to Polaris React!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants