Skip to content

Disable USWDS default external link screen reader text#11048

Merged
aduth merged 1 commit intomainfrom
aduth-external-link-accessible-name
Aug 12, 2024
Merged

Disable USWDS default external link screen reader text#11048
aduth merged 1 commit intomainfrom
aduth-external-link-accessible-name

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Aug 7, 2024

🛠 Summary of changes

Fixes an issue where external links doubly announce to screen readers that they open in a new window.

This addresses a few problems:

  • Double announcement
  • Lack of translation in non-English locales
  • Confusing placement of the text before the link content

This should hopefully be a temporary patch, pending upstream improvements tracked at uswds/uswds#5942

📜 Testing Plan

  1. Go to http://localhost:3000
  2. Enable screen reader
  3. Navigate to "Security Practices and Privacy Act Statement" link
  4. Observe that the link only announces that it opens in a new tab a single time, in the page's current locale, and after the link's content is announced

👀 Screenshots

Language Before After
English english-before english-after
Chinese chinese-before chinese-after

changelog: Bug Fixes, Accessibility, Remove confusing and duplicate external link announcement
@aduth aduth merged commit b863587 into main Aug 12, 2024
@aduth aduth deleted the aduth-external-link-accessible-name branch August 12, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants