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

cu: 5779 Audit VABulletList for a11yLabel usage #9736

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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: 1 addition & 1 deletion VAMobile/src/components/VABulletList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const VABulletList: FC<VABulletListProps> = ({ listOfText, paragraphSpacing }) =
<Box mr={20} mt={12}>
<VAIcon name="Bullet" fill={color || 'bodyText'} height={6} width={6} />
</Box>
<TextView {...textViewProps} accessibilityLabel={a11yLabel || text}>
<TextView {...textViewProps} accessibilityLabel={a11yLabel}>
{!!boldedTextPrefix && <TextView variant="MobileBodyBold">{boldedTextPrefix}</TextView>}
{text.trim()}
{!!boldedText && <TextView variant="MobileBodyBold">{boldedText}</TextView>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,8 @@ context('AppealStatus', () => {
),
).toBeTruthy()
expect(
screen.getByLabelText("Submit VA Form 9 to continue your appeal to the Board of Veterans' Appeals,"),
screen.getByText("Submit VA Form 9 to continue your appeal to the Board of Veterans' Appeals, or"),
).toBeTruthy()
expect(screen.getByText('or')).toBeTruthy()
expect(screen.getByText('Opt in to the new decision review process')).toBeTruthy()
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ context('ClosedClaimStatusDetails', () => {

it('renders list of claimed items', () => {
renderWithProps()
expect(screen.getByLabelText('Hearing Loss (Increase)')).toBeTruthy()
expect(screen.getByLabelText('Ankle strain (related to: PTSD - Combat POW) (New)')).toBeTruthy()
expect(screen.getByLabelText('Diabetes mellitus2 (Secondary)')).toBeTruthy()
expect(screen.getByText('Hearing Loss (Increase)')).toBeTruthy()
expect(screen.getByText('Ankle strain (related to: PTSD - Combat POW) (New)')).toBeTruthy()
expect(screen.getByText('Diabetes mellitus2 (Secondary)')).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ function PrescriptionsDetailsBanner() {
{
text: t('prescription.details.banner.bullet3'),
boldedText: ' ' + t('or'),
a11yLabel: t('prescription.details.banner.bullet3') + ' ' + t('or'),
},
{ text: t('prescription.details.banner.bullet4') },
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function ReplyHelp() {
{
boldedTextPrefix: t('secureMessaging.replyHelp.ifYoureInCrisis'),
text: t('secureMessaging.replyHelp.connectWithOur'),
a11yLabel: t('secureMessaging.replyHelp.ifYoureInCrisis') + t('secureMessaging.replyHelp.connectWithOur'),
},
]}
paragraphSpacing={true}
Expand All @@ -56,7 +55,6 @@ function ReplyHelp() {
{
boldedTextPrefix: t('secureMessaging.replyHelp.ifYouThink'),
text: t('secureMessaging.replyHelp.call911OrGoTo'),
a11yLabel: t('secureMessaging.replyHelp.ifYouThink') + t('secureMessaging.replyHelp.call911OrGoTo'),
},
]}
paragraphSpacing={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,21 @@ function WhatToKnowScreen({}: WhatToKnowScreenProps) {
variant: 'MobileBody',
boldedTextPrefix: t('personalInformation.genderIdentity.whatToKnow.ReasonsToShare.1'),
text: t('personalInformation.genderIdentity.whatToKnow.ReasonsToShare.2'),
a11yLabel:
t('personalInformation.genderIdentity.whatToKnow.ReasonsToShare.1') +
t('personalInformation.genderIdentity.whatToKnow.ReasonsToShare.2'),
},
{
variant: 'MobileBody',
boldedTextPrefix: t('personalInformation.genderIdentity.whatToKnow.whoCanAccess'),
text: t('personalInformation.genderIdentity.whatToKnow.privacy'),
a11yLabel:
t('personalInformation.genderIdentity.whatToKnow.whoCanAccess') +
t('personalInformation.genderIdentity.whatToKnow.privacy'),
},
{
variant: 'MobileBody',
boldedTextPrefix: t('personalInformation.genderIdentity.whatToKnow.healthRecordsOnly.1'),
text: t('personalInformation.genderIdentity.whatToKnow.healthRecordsOnly.2'),
a11yLabel:
t('personalInformation.genderIdentity.whatToKnow.healthRecordsOnly.1') +
t('personalInformation.genderIdentity.whatToKnow.healthRecordsOnly.2'),
},
{
variant: 'MobileBody',
boldedTextPrefix: t('personalInformation.genderIdentity.whatToKnow.birthCertificate.1'),
text: t('personalInformation.genderIdentity.whatToKnow.birthCertificate.2'),
a11yLabel:
t('personalInformation.genderIdentity.whatToKnow.birthCertificate.1') +
t('personalInformation.genderIdentity.whatToKnow.birthCertificate.2'),
},
]}
/>
Expand Down
1 change: 0 additions & 1 deletion VAMobile/src/screens/auth/LoaGate/LoaGate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function LoaGate({}: LoaGateProps) {
const bulletOne = {
text: t('loaGate.readMore.bulletOne'),
boldedText: ' ' + t('loaGate.readMore.or'),
a11yLabel: t('loaGate.readMore.bulletOne.a11y'),
}

const bodyTextProps: TextViewProps = {
Expand Down
Loading