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

AB#4280 -- Fixed aria-descriptions on input textboxes for screenreaders #1920

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ module.exports = {
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
//Note: aria-props for aria-description is only supported in the upcoming WAI-ARIA 1.3 spec
sebastien-comeau marked this conversation as resolved.
Show resolved Hide resolved
'jsx-a11y/aria-props': 'warn',
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default function ApplyFlowApplicationInformation() {
label={t('applicant-information.first-name')}
className="w-full"
maxLength={100}
aria-describedby="name-instructions"
aria-description={t('applicant-information.name-instructions')}
autoComplete="given-name"
errorMessage={errorMessages['first-name']}
defaultValue={defaultState?.firstName ?? ''}
Expand All @@ -238,7 +238,7 @@ export default function ApplyFlowApplicationInformation() {
autoComplete="family-name"
defaultValue={defaultState?.lastName ?? ''}
errorMessage={errorMessages['last-name']}
aria-describedby="name-instructions"
aria-description={t('applicant-information.name-instructions')}
required
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export default function ApplyFlowChildInformation() {
label={t('apply-adult-child:children.information.first-name')}
className="w-full"
maxLength={100}
aria-describedby="name-instructions"
aria-description={t('apply-adult-child:children.information.name-instructions')}
autoComplete="given-name"
errorMessage={fetcher.data?.errors.firstName?._errors[0]}
defaultValue={defaultState?.firstName ?? ''}
Expand All @@ -336,7 +336,7 @@ export default function ApplyFlowChildInformation() {
autoComplete="family-name"
defaultValue={defaultState?.lastName ?? ''}
errorMessage={fetcher.data?.errors.lastName?._errors[0]}
aria-describedby="name-instructions"
aria-description={t('apply-adult-child:children.information.name-instructions')}
required
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export default function ApplyFlowApplicationInformation() {
autoComplete="given-name"
defaultValue={defaultState?.firstName ?? ''}
errorMessage={fetcher.data?.errors.firstName?._errors[0]}
aria-describedby="name-instructions"
aria-description={t('partner-information.name-instructions')}
required
/>
<InputSanitizeField
Expand All @@ -257,7 +257,7 @@ export default function ApplyFlowApplicationInformation() {
autoComplete="family-name"
defaultValue={defaultState?.lastName ?? ''}
errorMessage={fetcher.data?.errors.lastName?._errors[0]}
aria-describedby="name-instructions"
aria-description={t('partner-information.name-instructions')}
required
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default function ApplyFlowApplicationInformation() {
label={t('applicant-information.first-name')}
className="w-full"
maxLength={100}
aria-describedby="name-instructions"
aria-description={t('applicant-information.name-instructions')}
autoComplete="given-name"
errorMessage={errorMessages['first-name']}
defaultValue={defaultState?.firstName ?? ''}
Expand All @@ -229,10 +229,10 @@ export default function ApplyFlowApplicationInformation() {
label={t('applicant-information.last-name')}
className="w-full"
maxLength={100}
aria-description={t('applicant-information.name-instructions')}
autoComplete="family-name"
defaultValue={defaultState?.lastName ?? ''}
errorMessage={errorMessages['last-name']}
aria-describedby="name-instructions"
required
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export default function ApplyFlowApplicationInformation() {
autoComplete="given-name"
defaultValue={defaultState?.firstName ?? ''}
errorMessage={fetcher.data?.errors.firstName?._errors[0]}
aria-describedby="name-instructions"
aria-description={t('partner-information.name-instructions')}
required
/>
<InputSanitizeField
Expand All @@ -251,7 +251,7 @@ export default function ApplyFlowApplicationInformation() {
autoComplete="family-name"
defaultValue={defaultState?.lastName ?? ''}
errorMessage={fetcher.data?.errors.lastName?._errors[0]}
aria-describedby="name-instructions"
aria-description={t('partner-information.name-instructions')}
required
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export default function ApplyFlowApplicationInformation() {
label={t('applicant-information.first-name')}
className="w-full"
maxLength={100}
aria-describedby="name-instructions"
aria-description={t('applicant-information.name-instructions')}
autoComplete="given-name"
errorMessage={errors?.firstName?._errors[0]}
defaultValue={defaultState?.firstName ?? ''}
Expand All @@ -329,7 +329,7 @@ export default function ApplyFlowApplicationInformation() {
autoComplete="family-name"
defaultValue={defaultState?.lastName ?? ''}
errorMessage={errors?.lastName?._errors[0]}
aria-describedby="name-instructions"
aria-description={t('applicant-information.name-instructions')}
required
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export default function ApplyFlowChildInformation() {
label={t('apply-child:children.information.first-name')}
className="w-full"
maxLength={100}
aria-describedby="name-instructions"
aria-description={t('apply-child:children.information.name-instructions')}
autoComplete="given-name"
errorMessage={fetcher.data?.errors.firstName?._errors[0]}
defaultValue={defaultState?.firstName ?? ''}
Expand All @@ -336,7 +336,7 @@ export default function ApplyFlowChildInformation() {
autoComplete="family-name"
defaultValue={defaultState?.lastName ?? ''}
errorMessage={fetcher.data?.errors.lastName?._errors[0]}
aria-describedby="name-instructions"
aria-description={t('apply-child:children.information.name-instructions')}
required
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export default function ApplyFlowApplicationInformation() {
autoComplete="given-name"
defaultValue={defaultState?.firstName ?? ''}
errorMessage={fetcher.data?.errors.firstName?._errors[0]}
aria-describedby="name-instructions"
aria-description={t('partner-information.name-instructions')}
required
/>
<InputSanitizeField
Expand All @@ -256,7 +256,7 @@ export default function ApplyFlowApplicationInformation() {
autoComplete="family-name"
defaultValue={defaultState?.lastName ?? ''}
errorMessage={fetcher.data?.errors.lastName?._errors[0]}
aria-describedby="name-instructions"
aria-description={t('partner-information.name-instructions')}
required
/>
</div>
Expand Down