Commit 8cbb6b8b authored by Ben Mullins's avatar Ben Mullins Committed by Sascha Eggenberger
Browse files

Issue #3374716: Prevent innacurate "insufficent contrast" errors from scanners...

Issue #3374716: Prevent innacurate "insufficent contrast" errors from scanners looking at visually hidden elements
parent 89332dba
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -43,6 +43,14 @@ a {
  word-wrap: break-word;
}

.visually-hidden {
  color: #000;
}

.gin--dark-mode .visually-hidden {
  color: #fff;
}

a,
.link,
button.link,
+15 −0
Original line number Diff line number Diff line
@@ -38,3 +38,18 @@ a {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

// Enforcing colors on visually hidden text does not change anything for the
// user, but it prevents accessibilty scanners like Wave from reporting contrast
// errors on visually hidden elements. While this is certainly an issue with the
// scanners and not Gin, this ensures that scans provide an accurate account of
// Gin's contrast support.
.visually-hidden {
  color: #000;

  .gin--dark-mode & {
    color: #FFF;
  }
}