-
Notifications
You must be signed in to change notification settings - Fork 1.1k
USWDS - Footer: Fix link styles for accessibility #5588
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
Conversation
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.
&:hover { | ||
text-decoration: underline; | ||
} | ||
|
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.
Styles redundant due to primary links having an underline in default states now
@include u-text("ink", "no-underline"); | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} |
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.
Additional styles redundant due to primary links having an underline in default states now
.usa-footer__primary-link { | ||
@include u-padding-x($theme-site-margins-mobile-width); | ||
@include u-padding-y(2); | ||
@include u-text("ink", "no-underline", "bold"); | ||
@include u-text("ink", "bold"); |
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.
Removing no-underline
from u-text()
mixin properly applies color and weight without causing any unintentional regressions.
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.
Simple and effective
Summary
Restores underlines to footer links in default states. Now, footer links meet WCAG 2.0 AA requirements.
Breaking change
This is not a breaking change
Related issue
Closes #5557
Related pull requests
Changelog →
Preview link
Default footer →
Big footer →
Slim footer →
Problem statement
Currently, footer links do not meet WCAG 2.0 AA accessibility requirements.
Solution
Restore underlines to links in default states.
Alternative solution
We could alternatively increase the color contrast of links to have at least a
3:1
contrast ratio to surrounding texts.This solution seems a bit more opinionated and relies on users to have not modified the colors of their footer text and/or links to ensure compliance.
Screenshots
Develop
After fix
Testing and review
Testing checklist