-
Notifications
You must be signed in to change notification settings - Fork 1k
USWDS - Links: External link labels #5166
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
Changes from 11 commits
e56e0b3
20f3afa
917b3e9
1d4f007
801b913
5cad4bf
fe1ed87
eb5400e
8e23349
30b4e6f
a07b6b6
e348c59
fae1ed3
94d4274
a00a4ed
7d4d554
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,13 @@ | |
|
||
<p>This is <a class="usa-link usa-color-text-visited" href="javascript:void(0);">a visited link</a>.</p> | ||
|
||
<p>This is a link that goes to an <a class="usa-link usa-link--external" href="https://i.giphy.com/media/WPzQF6ruiIIVzHNlwX/source.gif">external website</a>.</p> | ||
<p> | ||
This is a link that opens in <em>current</em> tab and goes to an <a class="usa-link usa-link--external" href="https://i.giphy.com/media/WPzQF6ruiIIVzHNlwX/source.gif">external website</a>. | ||
</p> | ||
|
||
<p> | ||
This is a link that opens in a <em>new</em> tab and goes to an <a class="usa-link usa-link--external" rel="noreferrer noopener" target="_blank" href="https://i.giphy.com/media/WPzQF6ruiIIVzHNlwX/source.gif">external website</a>. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've explicitly added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this is a best practice, would it be beneficial to include guidance on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've kept Either way, I've added it in guidance on site: |
||
</p> | ||
|
||
<div class="usa-dark-background padding-1 display-inline-block"> | ||
<p>This is <a class="usa-link" href="javascript:void(0);">a text link on a dark background</a>.</p> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,6 +123,11 @@ $theme-in-page-nav-margin-left: 4 !default; | |
$theme-in-page-nav-margin-top: 2.5 !default; | ||
$theme-in-page-nav-top: 4 !default; | ||
|
||
// Link | ||
$theme-external-link-sr-label: "External link" !default; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No action is required on this, but wondering if we can reduce some audio redundancy by removing the word “link” here so that it is just “External”. In Voiceover, that would mean the readout is “link, external, opens in a new tab [link text]”. I am not sure if other screen readers announce “link” in the same order though, so this might just reflect a VoiceOver bias. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @amycole501 did you notice this issue on NVDA/JAWS? If so, I can shorten it to just "External". |
||
$theme-external-link-sr-label-tab-new: "opens in a new tab" !default; | ||
$theme-external-link-sr-label-tab-same: "opens in current tab" !default; | ||
|
||
// Modal | ||
$theme-modal-border-radius: "lg" !default; | ||
$theme-modal-default-max-width: "mobile-lg" !default; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No action needed, just noting that opening
source.gif
is still a surprise every timeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that @amyleadem mentions it yes, it does say "link" twice (which is tricky to discern since some of the links say "link" in them.
Additionally, I hear JAWS trying to say the word "tab" which runs into the phrase "external website" both in ANDI and in JAWS. I'm attaching how it looks in ANDI so you can get an idea of how it sounds. Like a run-on sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amycole501 @amyleadem I've added the following changes:
$theme-external-link-sr-label
."External, opens in a new tab."
to prevent screen readers from jumbling the words together.