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
[Badge] Add customAccessibilityLabel prop #4028
Conversation
src/components/Badge/Badge.tsx
Outdated
@@ -23,6 +23,8 @@ export interface BadgeProps { | |||
* @default 'medium' | |||
*/ | |||
size?: Size; | |||
/** Pass a custom accessibilityLabel (overrides status and progress labels) */ | |||
customAccessibilityLabel?: string; |
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.
This PR looks good to me but I worry that this prop might be misunderstood and get misused. I like that it's different from the default accessibilityLabel
prop but I'm not sure the name tells you enough about what it does.
What about something terribly verbose?
statusAndProgressLabelOverride
4ab7db0
to
cc4bf2a
Compare
src/components/Badge/README.md
Outdated
<Badge | ||
status="success" | ||
progress="complete" | ||
customAccessibilityLabel="Status: Published. Your online store is visible." |
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.
customAccessibilityLabel="Status: Published. Your online store is visible." | |
statusAndProgressLabelOverride="Status: Published. Your online store is visible." |
✅ Percy requires a polaris admin to approve Good to 🚢 now! Thanks Emma! |
* add customA11yLabel prop, update docs and tests * update unreleased * update prop name and description * update readme
WHY are these changes introduced?
Experimenting with a proposed feature request #4027
WHAT is this pull request doing?
customAccessibilityLabel
for consumer's who need to pass more specific labels.How to 🎩
Badge with customAccessibilityLabel
story🎩 checklist
README.md
with documentation changes