-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[WIP] Added a11y section to the Button Readme.md #705
Conversation
- Tweaked language around how buttons are activated to include keyboard users. - Added best practices around using the accessibilityLabel prop and keyboard support. Currently this PR has an issue where the section displays for Web, iOS, and Android, although it should only be visible for web.
src/components/Button/README.md
Outdated
@@ -100,6 +100,59 @@ Add a menu item | |||
|
|||
<!-- end --> | |||
|
|||
<!-- content-for: web --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's take this off, as we'll extract the whole accessibility section out.
src/components/Button/README.md
Outdated
|
||
#### Don’t | ||
|
||
Don't |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this text required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since the Do/Don't icons don't have a text equivalent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it looks like usageblock might provide that but usagelist doesn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, usageblock might be the thing you're looking for.
src/components/Button/README.md
Outdated
|
||
When possible, give the button visible text that clearly conveys its purpose without the use of `accessibilityLabel`. Duplicating the Button text with `accessibilityLabel` when no additional content is needed is not necessary. | ||
|
||
<!-- usagelist --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried usageblock
instead?
- Removed content-for - Swapped usagelist for usageblock
@selenehinkley Right now this content would live in the main best practices and content guidelines section, if that's cool. |
Based on some more conversation with @selenehinkley, we're going to hold off on publishing for right now to help preserve the web/iOS/Android division. Let me know if you have questions! |
Closing this since we've sussed out the content order and layout and I've opened #924 to address publishing button and link docs together. |
Currently marked as WIP since this PR has an issue where the section displays for Web, iOS, and Android in the style guide, although it should only be visible for Web. (See issue: https://github.com/Shopify/polaris-styleguide/issues/2421)
WHY are these changes introduced?
Adds accessibility documentation and guidance for the Button component for consumption by the style guide.
WHAT is this pull request doing?