trussworks / react-uswds

USWDS 3.0 components built in React
https://trussworks.github.io/react-uswds/
Apache License 2.0
169 stars 78 forks source link

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

Closed kimallen closed 3 months ago

kimallen commented 3 months ago

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)

brandonlenz commented 3 months ago

@all-contributors please add @kimallen for a11y

allcontributors[bot] commented 3 months ago

@brandonlenz

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