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

Malformed aria on Progress and Accordion #913

Merged
merged 8 commits into from
Dec 6, 2023
5 changes: 4 additions & 1 deletion src/components/molecules/Progress/Progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { colors, typography } from '../../../constants';
import { Colors } from '../../../constants/colors';
import Text from '../../atoms/Text/Text';
import { useThemeContext } from '../../styles/Theme';
import HiddenText from '../../atoms/HiddenText/HiddenText';

export interface ProgressionStyleProps {
/**
Expand Down Expand Up @@ -106,11 +107,13 @@ const Progress = ({ totalSteps, currentStep, withStep = false, progressColor, ..

return (
<ProgressWrapper>
<HiddenText id="in-progress">In progress</HiddenText>
Copy link
Contributor

Choose a reason for hiding this comment

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

Might want to make this overridable or it'll be quite easy to have multiple ids which are the same in the DOM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we shouldn't have more than 1 progress bar on the page, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to hijack this thread, can someone approve this https://github.com/ZopaPublic/react-components/pull/936/files :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In order to get out from being a maintainer you need to help us fix the checks :)

<ProgressBar
role="progressbar"
aria-valuemax={totalSteps}
aria-valuenow={currentStep}
aria-label={`Static progress bar showing step ${currentStep} of ${totalSteps}`}
aria-valuetext={`Static progress bar showing step ${currentStep} of ${totalSteps}`}
aria-labelledby="in-progress"
{...rest}
>
{renderPoints()}
Expand Down
Loading
Loading