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

[WIP] Added a11y section to the Button Readme.md #705

Closed
wants to merge 3 commits into from

Conversation

dpersing
Copy link
Contributor

@dpersing dpersing commented Nov 30, 2018

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.

Screenshot of button content displaying in the style guide

WHAT is this pull request doing?

  • Tweaked language around how buttons are activated to include keyboard users.
  • Added best practices around using the accessibilityLabel prop and keyboard support.

- 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.
@BPScott BPScott temporarily deployed to polaris-react-pr-705 November 30, 2018 20:39 Inactive
@BPScott BPScott temporarily deployed to polaris-react-pr-705 November 30, 2018 22:59 Inactive
@@ -100,6 +100,59 @@ Add a menu item

<!-- end -->

<!-- content-for: web -->
Copy link
Contributor

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.


#### Don’t

Don't
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this text required?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.


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 -->
Copy link
Contributor

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
@dpersing
Copy link
Contributor Author

dpersing commented Dec 5, 2018

@selenehinkley Right now this content would live in the main best practices and content guidelines section, if that's cool.

@dpersing
Copy link
Contributor Author

dpersing commented Dec 5, 2018

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!

@dpersing
Copy link
Contributor Author

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.

@dpersing dpersing closed this Jan 23, 2019
@dpersing dpersing deleted the a11yupdates-button branch January 23, 2019 16:20
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.

3 participants