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

fix: add a statusText prop to StepIndicator to allow for i18n for the sr-only element Closes #2857 #2888

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

kimallen
Copy link
Contributor

@kimallen kimallen commented Apr 15, 2024

Summary

Incorporates the option to use i18n for screen-reader only text regarding the status of each step in the StepIndicator. Updates tests and storybook.

Related Issues or PRs

Closes #2857

How To Test

yarn storybook

In the 'Controls', create a statusText object (ex. {complete: "completado", incomplete: "no completado"}).
Using a screen reader, listen to the stated status of each step.
AND/OR
Look at the source code in the developer tools for each of the steps and see the sr-only element with the applied status text.

Screenshots (optional)

@kimallen kimallen requested a review from a team as a code owner April 15, 2024 17:54
@kimallen kimallen self-assigned this Apr 15, 2024
@kimallen kimallen requested a review from a team as a code owner April 15, 2024 17:57
@kimallen kimallen changed the title fix: add a statusText prop to StepIndicator to allow for i18n for the sr-only element Closes # fix: add a statusText prop to StepIndicator to allow for i18n for the sr-only element Closes #2857 Apr 15, 2024
Copy link
Contributor

@brandonlenz brandonlenz left a comment

Choose a reason for hiding this comment

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

This looks good to me! Thanks for adding this feature!

@brandonlenz
Copy link
Contributor

@all-contributors please add @kimallen for a11y

Copy link
Contributor

@brandonlenz

I've put up a pull request to add @kimallen! 🎉

@kimallen kimallen merged commit 855205e into main Apr 17, 2024
9 checks passed
@kimallen kimallen deleted the ka-StepIndicator-status-use-prop-2857 branch April 17, 2024 19:09
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.

[fix] StepIndicator has hard-coded English status "[not] completed"
2 participants