Skip to content

Commit

Permalink
Merge pull request #5625 from GSA/nl-a11y-images-alt-text-color
Browse files Browse the repository at this point in the history
Add CSS to ensure alt text is visible when images are turned off
  • Loading branch information
ToniBonittoGSA committed Dec 5, 2022
2 parents d0baa82 + 3a78912 commit 965ad02
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion themes/digital.gov/layouts/partials/core/header.html
Expand Up @@ -4,7 +4,7 @@
<div class="usa-logo" id="extended-logo">
<em class="usa-logo__text">
<a href="{{- "/" | relURL -}}" title="{{- .Site.Title }} Home" aria-label="{{- .Site.Title }} Home">
<img class="logo-black" src="{{- "img/digitalgov-logo.svg" | absURL -}}" alt="{{- .Site.Title -}} Logo" />
<img class="logo-black" src="{{- "img/digitalgov-logo.svg" | absURL -}}" alt="{{ .Site.Title }} Logo" />
</a>
</em>
<p class="sub-head display-none">{{- .Site.Params.description -}}</p>
Expand Down
1 change: 0 additions & 1 deletion themes/digital.gov/src/scss/new/_footer.scss
Expand Up @@ -46,5 +46,4 @@ footer.usa-footer{
}
}
}

}
4 changes: 4 additions & 0 deletions themes/digital.gov/src/scss/new/_images.scss
Expand Up @@ -43,3 +43,7 @@
@include u-float('left');
@include u-width('card-lg');
}

img[alt] {
font-style: italic;
}
5 changes: 5 additions & 0 deletions themes/digital.gov/src/scss/new/_uswds-overrides.scss
@@ -0,0 +1,5 @@
@use "uswds-core" as *;

.usa-identifier img[alt] {
@include u-text('white');
}
1 change: 1 addition & 0 deletions themes/digital.gov/src/scss/new/styles.scss
Expand Up @@ -12,6 +12,7 @@
// Import individual theme settings

@forward 'uswds-theme';
@forward 'uswds-overrides';
@forward "usa-site-alert";

// @forward "uswds-global";
Expand Down

0 comments on commit 965ad02

Please sign in to comment.