diff --git a/app/components/block_link_component.html.erb b/app/components/block_link_component.html.erb index 738bbbcbd76..b34ad5e838e 100644 --- a/app/components/block_link_component.html.erb +++ b/app/components/block_link_component.html.erb @@ -1,7 +1,7 @@ <%= wrapper do %> <%= content %> <% if new_tab %> - <%= t('links.new_window') %> + <%= t('links.new_tab') %> <% end %>
- <%= new_window_link_to( + <%= new_tab_link_to( t('doc_auth.instructions.learn_more'), MarketingSite.security_and_privacy_practices_url, ) %> diff --git a/app/views/idv/in_person/address.html.erb b/app/views/idv/in_person/address.html.erb index ec88ca63365..68dcfea4927 100644 --- a/app/views/idv/in_person/address.html.erb +++ b/app/views/idv/in_person/address.html.erb @@ -9,7 +9,7 @@ <% unless capture_secondary_id_enabled %>
<%= t('in_person_proofing.body.address.info') %> - <%= new_window_link_to( + <%= new_tab_link_to( t('in_person_proofing.body.address.learn_more'), MarketingSite.help_center_article_url( category: 'verify-your-identity', diff --git a/app/views/idv/in_person/ready_to_verify/show.html.erb b/app/views/idv/in_person/ready_to_verify/show.html.erb index 236487e29ee..149da2b8b17 100644 --- a/app/views/idv/in_person/ready_to_verify/show.html.erb +++ b/app/views/idv/in_person/ready_to_verify/show.html.erb @@ -44,7 +44,7 @@
<%= t('in_person_proofing.body.barcode.questions') %> <%= render ClickObserverComponent.new(event_name: 'IdV: user clicked what to bring link on ready to verify page') do %> - <%= new_window_link_to( + <%= new_tab_link_to( t('in_person_proofing.body.barcode.learn_more'), MarketingSite.help_center_article_url( category: 'verify-your-identity', diff --git a/app/views/idv/in_person/ssn.html.erb b/app/views/idv/in_person/ssn.html.erb index 195f167c9b6..383c171e609 100644 --- a/app/views/idv/in_person/ssn.html.erb +++ b/app/views/idv/in_person/ssn.html.erb @@ -18,7 +18,7 @@ locals:
<%= t('doc_auth.info.ssn') %> - <%= new_window_link_to(MarketingSite.security_and_privacy_practices_url, class: 'display-inline') do %> + <%= new_tab_link_to(MarketingSite.security_and_privacy_practices_url, class: 'display-inline') do %> <%= t('doc_auth.info.learn_more') %> <% end %>
diff --git a/app/views/idv/phone/new.html.erb b/app/views/idv/phone/new.html.erb index 104f5568354..e69ba929dc9 100644 --- a/app/views/idv/phone/new.html.erb +++ b/app/views/idv/phone/new.html.erb @@ -38,7 +38,7 @@- <%= new_window_link_to( + <%= new_tab_link_to( t('idv.troubleshooting.options.learn_more_verify_by_phone'), help_center_redirect_url( category: 'verify-your-identity', diff --git a/app/views/idv/phone_errors/warning.html.erb b/app/views/idv/phone_errors/warning.html.erb index e2df66bc221..f4099e51c60 100644 --- a/app/views/idv/phone_errors/warning.html.erb +++ b/app/views/idv/phone_errors/warning.html.erb @@ -25,7 +25,7 @@
<%= t('idv.failure.phone.warning.next_steps_html') %> - <%= new_window_link_to( + <%= new_tab_link_to( t('idv.failure.phone.warning.learn_more_link'), help_center_redirect_path( category: 'verify-your-identity', diff --git a/app/views/idv/review/new.html.erb b/app/views/idv/review/new.html.erb index a86b480a389..fe72a284986 100644 --- a/app/views/idv/review/new.html.erb +++ b/app/views/idv/review/new.html.erb @@ -15,7 +15,7 @@ <%= t('idv.messages.sessions.review_message', app_name: APP_NAME) %>
-<%= new_window_link_to( +<%= new_tab_link_to( t('idv.messages.sessions.read_more_encrypt', app_name: APP_NAME), MarketingSite.security_url, ) %> diff --git a/app/views/idv/ssn/show.html.erb b/app/views/idv/ssn/show.html.erb index c4b6b5238c3..5577ca0577b 100644 --- a/app/views/idv/ssn/show.html.erb +++ b/app/views/idv/ssn/show.html.erb @@ -25,7 +25,7 @@ locals:<%= t('doc_auth.info.ssn') %> - <%= new_window_link_to(MarketingSite.security_and_privacy_practices_url, class: 'display-inline') do %> + <%= new_tab_link_to(MarketingSite.security_and_privacy_practices_url, class: 'display-inline') do %> <%= t('doc_auth.info.learn_more') %> <% end %>
diff --git a/app/views/idv/unavailable/show.html.erb b/app/views/idv/unavailable/show.html.erb index 6a2f8c8bade..929e4228560 100644 --- a/app/views/idv/unavailable/show.html.erb +++ b/app/views/idv/unavailable/show.html.erb @@ -20,7 +20,7 @@ <%= t( 'idv.unavailable.next_steps_html', app_name: APP_NAME, - status_page_link: new_window_link_to( + status_page_link: new_tab_link_to( t('idv.unavailable.status_page_link'), StatusPage.base_url, ), diff --git a/app/views/shared/_footer_lite.html.erb b/app/views/shared/_footer_lite.html.erb index 994a86168d5..83c493405aa 100644 --- a/app/views/shared/_footer_lite.html.erb +++ b/app/views/shared/_footer_lite.html.erb @@ -1,15 +1,15 @@ diff --git a/app/views/shared/_recaptcha_disclosure.html.erb b/app/views/shared/_recaptcha_disclosure.html.erb index 521e4cb5ab9..4b20ccc1b69 100644 --- a/app/views/shared/_recaptcha_disclosure.html.erb +++ b/app/views/shared/_recaptcha_disclosure.html.erb @@ -2,8 +2,8 @@ <%= t( 'two_factor_authentication.recaptcha.disclosure_statement_html', app_name: APP_NAME, - google_policy_link: new_window_link_to(t('two_factor_authentication.recaptcha.google_policy_link'), GooglePolicySite.privacy_url), - google_tos_link: new_window_link_to(t('two_factor_authentication.recaptcha.google_tos_link'), GooglePolicySite.terms_url), - login_tos_link: new_window_link_to(t('two_factor_authentication.recaptcha.login_tos_link'), MarketingSite.rules_of_use_url), + google_policy_link: new_tab_link_to(t('two_factor_authentication.recaptcha.google_policy_link'), GooglePolicySite.privacy_url), + google_tos_link: new_tab_link_to(t('two_factor_authentication.recaptcha.google_tos_link'), GooglePolicySite.terms_url), + login_tos_link: new_tab_link_to(t('two_factor_authentication.recaptcha.login_tos_link'), MarketingSite.rules_of_use_url), ) %> \ No newline at end of file diff --git a/app/views/sign_up/registrations/_required_pii_accordion.html.erb b/app/views/sign_up/registrations/_required_pii_accordion.html.erb index 59b9948fbf7..355a95cd0d5 100644 --- a/app/views/sign_up/registrations/_required_pii_accordion.html.erb +++ b/app/views/sign_up/registrations/_required_pii_accordion.html.erb @@ -65,6 +65,6 @@- <%= new_window_link_to t('devise.registrations.start.learn_more'), MarketingSite.help_url %> + <%= new_tab_link_to t('devise.registrations.start.learn_more'), MarketingSite.help_url %>
<% end %> diff --git a/app/views/sign_up/registrations/new.html.erb b/app/views/sign_up/registrations/new.html.erb index 03e44f7abff..50c4a104b94 100644 --- a/app/views/sign_up/registrations/new.html.erb +++ b/app/views/sign_up/registrations/new.html.erb @@ -44,7 +44,7 @@ as: :boolean, label: capture do %> <%= t('sign_up.terms', app_name: APP_NAME) %> - <%= new_window_link_to(t('titles.rules_of_use'), MarketingSite.rules_of_use_url) %> + <%= new_tab_link_to(t('titles.rules_of_use'), MarketingSite.rules_of_use_url) %> <% end, label_html: { class: 'margin-y-0' }, required: true, @@ -56,14 +56,14 @@ <%= render 'shared/cancel', link: decorated_session.cancel_link_url %>- <%= new_window_link_to( + <%= new_tab_link_to( t('notices.privacy.security_and_privacy_practices'), MarketingSite.security_and_privacy_practices_url, ) %>
- <%= new_window_link_to( + <%= new_tab_link_to( t('notices.privacy.privacy_act_statement'), MarketingSite.privacy_act_statement_url, ) %> diff --git a/app/views/users/emails/show.html.erb b/app/views/users/emails/show.html.erb index b16dc470aa2..38fa5bf8e8f 100644 --- a/app/views/users/emails/show.html.erb +++ b/app/views/users/emails/show.html.erb @@ -21,11 +21,15 @@ <%= render 'shared/cancel', link: decorated_session.cancel_link_url %>
- <%= new_window_link_to t('notices.privacy.security_and_privacy_practices'), - MarketingSite.security_and_privacy_practices_url %> + <%= new_tab_link_to( + t('notices.privacy.security_and_privacy_practices'), + MarketingSite.security_and_privacy_practices_url, + ) %>
- <%= new_window_link_to t('notices.privacy.privacy_act_statement'), - MarketingSite.privacy_act_statement_url %> + <%= new_tab_link_to( + t('notices.privacy.privacy_act_statement'), + MarketingSite.privacy_act_statement_url, + ) %>
diff --git a/app/views/users/rules_of_use/new.html.erb b/app/views/users/rules_of_use/new.html.erb index 3e7a0b8c56a..fa949835c6a 100644 --- a/app/views/users/rules_of_use/new.html.erb +++ b/app/views/users/rules_of_use/new.html.erb @@ -5,7 +5,7 @@<%= t( 'users.rules_of_use.overview_html', - link: new_window_link_to( + link: new_tab_link_to( t('titles.rules_of_use'), MarketingSite.rules_of_use_url, ), @@ -24,7 +24,7 @@ as: :boolean, label: capture do %> <%= t('users.rules_of_use.check_box_to_accept', app_name: APP_NAME) %> - <%= new_window_link_to(t('titles.rules_of_use'), MarketingSite.rules_of_use_url) %> + <%= new_tab_link_to(t('titles.rules_of_use'), MarketingSite.rules_of_use_url) %> <% end, required: true, ) %> diff --git a/app/views/users/totp_setup/new.html.erb b/app/views/users/totp_setup/new.html.erb index f5b990433ae..2e4afd1a318 100644 --- a/app/views/users/totp_setup/new.html.erb +++ b/app/views/users/totp_setup/new.html.erb @@ -5,7 +5,7 @@
<%= t( 'forms.totp_setup.totp_intro_html', - link: new_window_link_to(t('links.what_is_totp'), MarketingSite.help_authentication_app_url), + link: new_tab_link_to(t('links.what_is_totp'), MarketingSite.help_authentication_app_url), ) %>
diff --git a/config/locales/links/en.yml b/config/locales/links/en.yml index 5627e72f7e3..aa04471339d 100644 --- a/config/locales/links/en.yml +++ b/config/locales/links/en.yml @@ -15,7 +15,7 @@ en: exit_login: Exit %{app_name} go_back: Go back help: Help - new_window: '(opens new window)' + new_tab: '(opens new tab)' next: Sign in passwords: forgot: Forgot your password? diff --git a/config/locales/links/es.yml b/config/locales/links/es.yml index 395b5d7634d..4e12f6e9084 100644 --- a/config/locales/links/es.yml +++ b/config/locales/links/es.yml @@ -15,7 +15,7 @@ es: exit_login: Salga de %{app_name} go_back: Regresa help: Ayuda - new_window: '(abre nueva ventana)' + new_tab: (abrir nueva pestaña) next: Siguiente passwords: forgot: '¿Olvidó su contraseña?' diff --git a/config/locales/links/fr.yml b/config/locales/links/fr.yml index 87ebf5624d4..bda9f2ede0f 100644 --- a/config/locales/links/fr.yml +++ b/config/locales/links/fr.yml @@ -15,7 +15,7 @@ fr: exit_login: Quitter %{app_name} go_back: Retourner help: Aide - new_window: '(ouvre une nouvelle fenêtre)' + new_tab: '(ouvre un nouvel onglet)' next: Suivant passwords: forgot: Vous avez oublié votre mot de passe? diff --git a/spec/components/block_link_component_spec.rb b/spec/components/block_link_component_spec.rb index 1b50eabad5f..f42393119b7 100644 --- a/spec/components/block_link_component_spec.rb +++ b/spec/components/block_link_component_spec.rb @@ -25,7 +25,7 @@ rendered = render_inline BlockLinkComponent.new(url: '/', new_tab: true) expect(rendered).to have_css('.block-link.usa-link.usa-link--external[target=_blank]') - expect(rendered).to have_content(t('links.new_window')) + expect(rendered).to have_content(t('links.new_tab')) end end diff --git a/spec/helpers/link_helper_spec.rb b/spec/helpers/link_helper_spec.rb index 6da64d15dfa..4a1a249dfed 100644 --- a/spec/helpers/link_helper_spec.rb +++ b/spec/helpers/link_helper_spec.rb @@ -3,19 +3,19 @@ RSpec.describe LinkHelper do include LinkHelper - describe '#new_window_link_to' do + describe '#new_tab_link_to' do let(:name) { 'Link' } let(:html_options) { {} } - subject(:link) { new_window_link_to(name, '', **html_options) } + subject(:link) { new_tab_link_to(name, '', **html_options) } it 'opens in a new tab' do expect(link).to have_css('[target=_blank]') end it 'includes an accessibility hint about opening in a new tab' do - expect(link).to have_content("#{name}#{t('links.new_window')}") - expect(link).to have_css('.usa-sr-only', text: t('links.new_window')) + expect(link).to have_content("#{name}#{t('links.new_tab')}") + expect(link).to have_css('.usa-sr-only', text: t('links.new_tab')) end it 'adds design system external link class' do @@ -33,7 +33,7 @@ context 'with whitespace in the link text' do subject(:link) do - new_window_link_to('', {}) do + new_tab_link_to('', {}) do concat content_tag(:span, name) concat ' ' end @@ -42,7 +42,7 @@ it 'trims whitespace between link text and the accessible label' do # Regression: Safari's handling of the trailing whitespace would cause the external link # icon to be shown on a new line. - expect(link).to have_content("#{name}#{t('links.new_window')}") + expect(link).to have_content("#{name}#{t('links.new_tab')}") end end @@ -63,12 +63,12 @@ end context 'content given as block' do - subject(:link) { new_window_link_to('/url', **html_options) { name } } + subject(:link) { new_tab_link_to('/url', **html_options) { name } } it 'renders a link with the expected attributes' do expect(link).to have_css( '.usa-link--external[href="/url"][target=_blank]', - text: "#{name}#{t('links.new_window')}", + text: "#{name}#{t('links.new_tab')}", ) end diff --git a/spec/javascript/packages/document-capture/components/documents-step-spec.jsx b/spec/javascript/packages/document-capture/components/documents-step-spec.jsx index 2e4b7e200db..e1d5adf102a 100644 --- a/spec/javascript/packages/document-capture/components/documents-step-spec.jsx +++ b/spec/javascript/packages/document-capture/components/documents-step-spec.jsx @@ -112,8 +112,7 @@ describe('document-capture/components/documents-step', () => { getByRole('heading', { name: 'components.troubleshooting_options.default_heading' }), ).to.be.ok(); expect( - getByRole('link', { name: 'idv.troubleshooting.options.get_help_at_sp links.new_window' }) - .href, + getByRole('link', { name: 'idv.troubleshooting.options.get_help_at_sp links.new_tab' }).href, ).to.equal( 'https://example.com/?step=document_capture&location=document_capture_troubleshooting_options', ); diff --git a/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx b/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx index 818fe383ec4..b9c027f2537 100644 --- a/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx +++ b/spec/javascript/packages/document-capture/components/review-issues-step-spec.jsx @@ -62,11 +62,11 @@ describe('document-capture/components/review-issues-step', () => { expect(getByRole('button', { name: 'idv.failure.button.warning' })).to.be.ok(); expect( - getByRole('link', { name: 'idv.troubleshooting.options.doc_capture_tips links.new_window' }), + getByRole('link', { name: 'idv.troubleshooting.options.doc_capture_tips links.new_tab' }), ).to.exist(); expect( getByRole('link', { - name: 'idv.troubleshooting.options.supported_documents links.new_window', + name: 'idv.troubleshooting.options.supported_documents links.new_tab', }), ).to.exist(); }); @@ -191,8 +191,7 @@ describe('document-capture/components/review-issues-step', () => { getByRole('heading', { name: 'components.troubleshooting_options.default_heading' }), ).to.be.ok(); expect( - getByRole('link', { name: 'idv.troubleshooting.options.get_help_at_sp links.new_window' }) - .href, + getByRole('link', { name: 'idv.troubleshooting.options.get_help_at_sp links.new_tab' }).href, ).to.equal( 'https://example.com/?step=document_capture&location=document_capture_troubleshooting_options', );