Repository navigation
Inconsistent support for "alt" link styling #4582
Copy link
Copy link
Closed as not planned
Labels
Affects: DisplayRelates to how code renders on-screenRelates to how code renders on-screenNeeds: ConfirmationReported behavior needs validation. Remove after recording reproduction or investigation results.Reported behavior needs validation. Remove after recording reproduction or investigation results.Package: LinkWork affecting Link. Apply only when this area helps route or find the issue.Work affecting Link. Apply only when this area helps route or find the issue.Status: not plannedA documented decision not to pursue work now. Use GitHub closure reason when the decision is final.A documented decision not to pursue work now. Use GitHub closure reason when the decision is final.
Description
Describe the bug
USWDS includes styles for an "alt" link modifier, where "alt" appears to be for a link shown on a dark background.
However, these styles are inconsistent, because:
- It only applies to external links
- It only applies reverse link styling to the external link icon, not the text itself
uswds/src/stylesheets/elements/typography/_links.scss
Lines 12 to 14 in 7349ddf
| &.usa-link--alt { | |
| @include external-link($contrast-bg: "base-darker"); | |
| } |
Steps to reproduce the bug
- Go to https://designsystem.digital.gov/components/link/
- Right-click and "Inspect element" on one of the preview links
- Add the class "usa-link--alt"
Expected: Reverse styles are shown, regardless if the link is external.
Actual: Nothing happens.
System setup
- USWDS version: v2.13.2
Additional context
There may be multiple ways to solve this:
- Add support for "alt" links consistently as applying reverse link styling
- Action: Add
.usa-link--altstyles that apply to all links, not just external links - Action: If needed, improve
.usa-link--external.usa-link--altstyles to also apply styling to the link text, not just the icon.- Technically, the icon styles are redundant with new improved external link icon styling from Links: Use add-color-icon mixin with currentColor for external link #4297, and could be removed.
- Action: Add
- Remove support for "alt" links and only support reverse link styling within
usa-dark-background- Action: Remove
.usa-link--altstyles- Technically, they are already redundant with new improved external link icon styling from Links: Use add-color-icon mixin with currentColor for external link #4297
- Consider:
usa-dark-backgroundis opinionated about specific background color (base-dark)
- Action: Remove
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Affects: DisplayRelates to how code renders on-screenRelates to how code renders on-screenNeeds: ConfirmationReported behavior needs validation. Remove after recording reproduction or investigation results.Reported behavior needs validation. Remove after recording reproduction or investigation results.Package: LinkWork affecting Link. Apply only when this area helps route or find the issue.Work affecting Link. Apply only when this area helps route or find the issue.Status: not plannedA documented decision not to pursue work now. Use GitHub closure reason when the decision is final.A documented decision not to pursue work now. Use GitHub closure reason when the decision is final.
Type
Projects
- StatusShow more project fieldsDone
Activity
annepetersen commentedon Apr 29, 2026
Hi there: this is one of many submitted PRs/issues that have languished here. USWDS is currently understaffed, so I'm closing items that aren’t as high on the priority list right now, including this one, unfortunately.