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

[a11y] Add drop zone component a11y docs and edit description #2243

Merged
merged 7 commits into from Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions UNRELEASED.md
Expand Up @@ -17,6 +17,8 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f

### Documentation

- Added accessibility documentation for the drop zone component ([#2243](https://github.com/Shopify/polaris-react/pull/2243))

### Development workflow

### Dependency upgrades
Expand Down
37 changes: 36 additions & 1 deletion src/components/DropZone/README.md
Expand Up @@ -16,7 +16,7 @@ keywords:

# Drop zone

The drop zone component lets merchants upload files by dragging and dropping files into an area on a page.
The drop zone component lets users upload files by dragging and dropping the files into an area on a page, or activating a button.

---

Expand Down Expand Up @@ -481,3 +481,38 @@ Use file upload with the drop zone component to let merchants select files for u

- To provide context to upload errors when they occur, use the [banner component](https://polaris.shopify.com/components/feedback-indicators/banner)
- To provide feedback during file upload, use the [spinner component](https://polaris.shopify.com/components/feedback-indicators/spinner)

---

## Accessibility

<!-- content-for: android -->

See Material Design and development documentation about accessibility for Android:

- [Accessible design on Android](https://material.io/design/usability/accessibility.html)
- [Accessible development on Android](https://developer.android.com/guide/topics/ui/accessibility/)

<!-- /content-for -->

<!-- content-for: ios -->

See Apple’s Human Interface Guidelines and API documentation about accessibility for iOS:

- [Accessible design on iOS](https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/accessibility/)
- [Accessible development on iOS](https://developer.apple.com/accessibility/ios/)

<!-- /content-for -->

<!-- content-for: web -->

The drop zone component builds on the native HTML `<input type=”upload”>` element by including a `<button>` as well as a drag and drop area.
sadiesaurus marked this conversation as resolved.
Show resolved Hide resolved

### Keyboard support

To upload a file with the keyboard, merchants interact with the “Add file” button.
sadiesaurus marked this conversation as resolved.
Show resolved Hide resolved

- To give the button keyboard focus, use the <kbd>tab</kbd> key (or <kbd>shift</kbd> + <kbd>tab</kbd> when tabbing backwards)
sadiesaurus marked this conversation as resolved.
Show resolved Hide resolved
- To activate the button, use the <kbd>enter</kbd>/<kbd>return</kbd> or <kbd>space</kbd> keys
sadiesaurus marked this conversation as resolved.
Show resolved Hide resolved

<!-- /content-for -->