Skip to content

Commit

Permalink
changed colors on some items for 508 compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
ehaines1 committed Dec 20, 2024
1 parent cefafce commit abff820
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 14 deletions.
22 changes: 9 additions & 13 deletions PowerShell/ScubaGear/Modules/CreateReport/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,31 @@ const colorRows = () => {
for (let i = 0; i < rows.length; i++) {
try {
if (rows[i].children[requirementCol].innerHTML.startsWith("[DELETED]")) {
rows[i].style.color = "var(--test-deleted-color)";
rows[i].style.background = "var(--test-other)";
rows[i].dataset.state = "deleted";
}
else if (rows[i].children[statusCol].innerHTML.startsWith("Bug")){
rows[i].style.background = "var(--test-bug-color)";
rows[i].dataset.state = "bug";
}
else if (rows[i].children[statusCol].innerHTML === "Fail") {
rows[i].style.background = "var(--test-fail)";
rows[i].style.color = "var(--test-error-color)";
rows[i].dataset.state = "fail";
}
else if (rows[i].children[statusCol].innerHTML === "Warning") {
rows[i].style.background = "var(--test-warning)";
rows[i].dataset.state = "warning";
}
else if (rows[i].children[statusCol].innerHTML === "Pass") {
rows[i].style.background = "var(--test-pass)";
rows[i].dataset.state = "pass";
}
else if (rows[i].children[statusCol].innerHTML === "Omitted") {
rows[i].style.background = "var(--test-other)";
rows[i].dataset.state = "omitted";
}
else if (rows[i].children[criticalityCol].innerHTML.includes("Not-Implemented")) {
rows[i].style.background = "var(--test-other)";
rows[i].dataset.state = "notimplemented";
}
else if (rows[i].children[criticalityCol].innerHTML.includes("3rd Party")) {
rows[i].style.background = "var(--test-other)";
rows[i].dataset.state = "thirdparty";
}
else if (rows[i].children[statusCol].innerHTML.includes("Error")) {
rows[i].style.background = "var(--test-fail)";
rows[i].querySelectorAll('td')[statusCol].style.borderColor = "var(--border-color)";
rows[i].querySelectorAll('td')[statusCol].style.color = "var(--test-error-color)";
rows[i].dataset.state = "error";
}
}
catch (error) {
Expand Down
53 changes: 52 additions & 1 deletion PowerShell/ScubaGear/Modules/CreateReport/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
--cap-even: #0052882d;
--cap-hover: #00528850;
--header-color: #005288;
--note-color: #ee4e04;
--note-color: #D34503;
--header-bottom: black;
--link-color: #85B065;
--unvisited-link-color: #00668f;
--fail-link-color: #D7EDF4;
--text-color: black;
--uuid-color: #424242;
--border-color: black;
Expand All @@ -39,6 +40,7 @@ html[data-theme='dark'] {
--header-bottom: rgb(221, 221, 221);
--link-color: #85B065;
--unvisited-link-color: #E6F598;
--fail-link-color: #E6F598;;
--text-color: #bdbdbd;
--uuid-color: #999999;
--border-color: #7b7b7b;
Expand Down Expand Up @@ -132,6 +134,51 @@ td {
overflow-wrap: break-word;
}

tr[data-state="pass"] {
background:var(--test-pass);
}

tr[data-state="fail"] {
background:var(--test-fail);
color:var(--test-error-color);
td a {
color:var(--fail-link-color);
}
}

tr[data-state="bug"] {
background:var(--test-bug-color);
}

tr[data-state="warning"] {
background:var(--test-warning);
}

tr[data-state="deleted"] {
background:var(--test-other);
color:var(--test-deleted-color);
}

tr[data-state="omitted"]{
background:var(--test-other);
}

tr[data-state="notimplemented"]{
background:var(--test-other);
}

tr[data-state="thirdparty"]{
background:var(--test-other);
}

tr[data-state="error"]{
background:var(--test-fail);
td {
border-color:var(--border-color);
color:var(--test-error-color);
}
}

td a {
color: var(--header-color);
}
Expand Down Expand Up @@ -173,6 +220,10 @@ img {
width: 6.25em;
}

a[href="#caps"] {
color: var(--caps-link-color);
}

#caps h2 {
margin-top: 3.125em;
}
Expand Down

0 comments on commit abff820

Please sign in to comment.