From f9ff7b963299bbd8e18042b37b5d2a9bcaec2fee Mon Sep 17 00:00:00 2001 From: Caitlin <78328496+CaitHawk@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:27:54 -0800 Subject: [PATCH] Updates strong tag for screen reader optimization (#33318) --- .../sign-in-changes/components/AccountSwitch.jsx | 9 +++++---- .../sign-in-changes/containers/InterstitialChanges.jsx | 4 ++-- .../sign-in-changes/tests/AccountSwitch.unit.spec.jsx | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/applications/sign-in-changes/components/AccountSwitch.jsx b/src/applications/sign-in-changes/components/AccountSwitch.jsx index f0b1b40f3032..0e223e044a2c 100644 --- a/src/applications/sign-in-changes/components/AccountSwitch.jsx +++ b/src/applications/sign-in-changes/components/AccountSwitch.jsx @@ -23,13 +23,14 @@ export default function AccountSwitch({ userEmails }) { const userHasIdme = userEmails.idme; const userHasLogingov = userEmails.logingov; const userHasBoth = userHasIdme && userHasLogingov; - const headingText = userHasLogingov ? 'Login.gov' : 'ID.me'; + const cspText = userHasLogingov ? 'Login.gov' : 'ID.me'; + const headingText = `Start using your ${ + userHasBoth ? 'Login.gov or ID.me' : cspText + } account now`; return (

- Start using your{' '} - {userHasBoth ? 'Login.gov or ID.me' : headingText}{' '} - account now + {headingText}

{userHasLogingov && ( Or continue using your old account

- You’ll can use your My HealtheVet account to sign in - until January 31, 2025. + You can use your My HealtheVet account to sign in until{' '} + January 31, 2025.

{ expect(screen.getAllByRole('button').length).to.eql(2); expect( screen.getByText((content, element) => { - const hasText = /Start using your account now/i.test(content); + const hasText = /Start using your/i.test(content); const isHeading = element.tagName.toLowerCase() === 'h2'; return hasText && isHeading; }),