Skip to content

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

Merged
merged 16 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Simplify external link language
- Remove base variable `$theme-external-link-sr-label`
- Use punctuation to prevent run-on sentences in screen readers
  • Loading branch information
James Mejia committed Apr 11, 2023
commit 94d4274952d62c3799095bbf6949e4db84aa0643
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ $icon-object: (
// Screen reader label
&::before {
@include sr-only;
content: "#{$theme-external-link-sr-label}, #{$theme-external-link-sr-label-tab-same}";
content: $theme-external-link-sr-label-tab-same;
}

&[target="_blank"]::before {
@include sr-only;
content: "#{$theme-external-link-sr-label}, #{$theme-external-link-sr-label-tab-new}";
content: $theme-external-link-sr-label-tab-new;
}

&::after {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ $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;
$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;
$theme-external-link-sr-label-tab-new: "External, opens in a new tab." !default;
$theme-external-link-sr-label-tab-same: "External, opens in current tab." !default;

// Modal
$theme-modal-border-radius: "lg" !default;
Expand Down