primitives icon indicating copy to clipboard operation
primitives copied to clipboard

Adding missing contrast checks

Open lukasoppermann opened this issue 1 year ago • 1 comments

Summary

Adding control color contrast checks

[!Warning] A11y test needs to be run manually to see if it passes as this PR does not change any tokens. https://github.com/primer/primitives/actions/runs/8939783026

lukasoppermann avatar May 03 '24 12:05 lukasoppermann

⚠️ No Changeset found

Latest commit: 20eefae9c3c7f5b41643f5d7c4129dd7c1894858

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar May 03 '24 12:05 changeset-bot[bot]

Design Token Contrast Check

light: ✅ all checks passed

Show results table for theme: light
contrastPair pass contrastRatio minimumContrastRatio
fgColor-default vs. bgColor-default 15.79:1 4.5:1
fgColor-muted vs. bgColor-default 5.33:1 4.5:1
fgColor-default vs. bgColor-muted 14.83:1 4.5:1
fgColor-muted vs. bgColor-muted 5.01:1 4.5:1
fgColor-default vs. bgColor-inset 14.83:1 4.5:1
fgColor-muted vs. bgColor-inset 5.01:1 4.5:1
control-fgColor-rest vs. bgColor-default 14.65:1 4.5:1
control-fgColor-rest vs. bgColor-muted 13.76:1 4.5:1
control-fgColor-rest vs. bgColor-inset 13.76:1 4.5:1
control-fgColor-rest vs. control-bgColor-rest 13.76:1 4.5:1
control-fgColor-placeholder vs. control-bgColor-rest 4.58:1 4.5:1
control-fgColor-rest vs. control-bgColor-active 12.22:1 4.5:1
control-fgColor-rest vs. control-bgColor-selected 13.76:1 4.5:1
fgColor-default vs. bgColor-accent-muted 13.88:1 4.5:1
fgColor-default vs. bgColor-success-muted 14.19:1 4.5:1
fgColor-default vs. bgColor-open-muted 14.19:1 4.5:1
fgColor-default vs. bgColor-danger-muted 13.77:1 4.5:1
fgColor-default vs. bgColor-closed-muted 13.77:1 4.5:1
fgColor-default vs. bgColor-attention-muted 14.65:1 4.5:1
fgColor-default vs. bgColor-severe-muted 14.26:1 4.5:1
fgColor-default vs. bgColor-done-muted 14.21:1 4.5:1
fgColor-default vs. bgColor-sponsors-muted 14.24:1 4.5:1
fgColor-accent vs. bgColor-default 5.19:1 4.5:1
fgColor-accent vs. bgColor-muted 4.87:1 4.5:1
fgColor-accent vs. bgColor-inset 4.87:1 4.5:1
fgColor-success vs. bgColor-default 5.07:1 4.5:1
fgColor-success vs. bgColor-muted 4.77:1 4.5:1
fgColor-success vs. bgColor-inset 4.77:1 4.5:1
fgColor-open vs. bgColor-default 5.07:1 4.5:1
fgColor-open vs. bgColor-muted 4.77:1 4.5:1
fgColor-open vs. bgColor-inset 4.77:1 4.5:1
fgColor-danger vs. bgColor-default 5.24:1 4.5:1
fgColor-danger vs. bgColor-muted 4.92:1 4.5:1
fgColor-danger vs. bgColor-inset 4.92:1 4.5:1
fgColor-closed vs. bgColor-default 5.24:1 4.5:1
fgColor-closed vs. bgColor-muted 4.92:1 4.5:1
fgColor-closed vs. bgColor-inset 4.92:1 4.5:1
fgColor-attention vs. bgColor-default 4.86:1 4.5:1
fgColor-attention vs. bgColor-muted 4.57:1 4.5:1
fgColor-attention vs. bgColor-inset 4.57:1 4.5:1
fgColor-severe vs. bgColor-default 5.03:1 4.5:1
fgColor-severe vs. bgColor-muted 4.72:1 4.5:1
fgColor-severe vs. bgColor-inset 4.72:1 4.5:1
fgColor-done vs. bgColor-default 5.04:1 4.5:1
fgColor-done vs. bgColor-muted 4.73:1 4.5:1
fgColor-done vs. bgColor-inset 4.73:1 4.5:1
fgColor-sponsors vs. bgColor-default 5.04:1 4.5:1
fgColor-sponsors vs. bgColor-muted 4.73:1 4.5:1
fgColor-sponsors vs. bgColor-inset 4.73:1 4.5:1
fgColor-accent vs. bgColor-accent-muted 4.56:1 4.5:1
fgColor-success vs. bgColor-success-muted 4.56:1 4.5:1
fgColor-open vs. bgColor-open-muted 4.56:1 4.5:1
fgColor-danger vs. bgColor-danger-muted 4.57:1 4.5:1
fgColor-closed vs. bgColor-closed-muted 4.57:1 4.5:1
fgColor-attention vs. bgColor-attention-muted 4.51:1 4.5:1
fgColor-severe vs. bgColor-severe-muted 4.54:1 4.5:1
fgColor-done vs. bgColor-done-muted 4.53:1 4.5:1
fgColor-sponsors vs. bgColor-sponsors-muted 4.55:1 4.5:1
fgColor-onEmphasis vs. bgColor-neutral-emphasis 4.54:1 4.5:1
fgColor-onEmphasis vs. bgColor-accent-emphasis 5.19:1 4.5:1
fgColor-onEmphasis vs. bgColor-success-emphasis 4.51:1 4.5:1
fgColor-onEmphasis vs. bgColor-open-emphasis 4.51:1 4.5:1
fgColor-onEmphasis vs. bgColor-danger-emphasis 5.35:1 4.5:1
fgColor-onEmphasis vs. bgColor-closed-emphasis 5.35:1 4.5:1
fgColor-onEmphasis vs. bgColor-attention-emphasis 4.86:1 4.5:1
fgColor-onEmphasis vs. bgColor-severe-emphasis 5.03:1 4.5:1
fgColor-onEmphasis vs. bgColor-done-emphasis 5.04:1 4.5:1
fgColor-onEmphasis vs. bgColor-sponsors-emphasis 5.04:1 4.5:1
control-borderColor-emphasis vs. bgColor-default 3.27:1 3:1
control-borderColor-emphasis vs. bgColor-muted 3.08:1 3:1

dark: ✅ all checks passed

Show results table for theme: dark
contrastPair pass contrastRatio minimumContrastRatio
fgColor-default vs. bgColor-default 16.01:1 4.5:1
fgColor-muted vs. bgColor-default 6.31:1 4.5:1
fgColor-default vs. bgColor-muted 14.63:1 4.5:1
fgColor-muted vs. bgColor-muted 5.76:1 4.5:1
fgColor-default vs. bgColor-inset 17.37:1 4.5:1
fgColor-muted vs. bgColor-inset 6.84:1 4.5:1
control-fgColor-rest vs. bgColor-default 12.26:1 4.5:1
control-fgColor-rest vs. bgColor-muted 11.2:1 4.5:1
control-fgColor-rest vs. bgColor-inset 13.3:1 4.5:1
control-fgColor-rest vs. control-bgColor-rest 9.86:1 4.5:1
control-fgColor-placeholder vs. control-bgColor-rest 4.58:1 4.5:1
control-fgColor-rest vs. control-bgColor-active 7.87:1 4.5:1
control-fgColor-rest vs. control-bgColor-selected 11.2:1 4.5:1
fgColor-default vs. bgColor-accent-muted on bgColor-default 14.34:1 4.5:1
fgColor-default vs. bgColor-accent-muted on bgColor-muted 12.91:1 4.5:1
fgColor-default vs. bgColor-success-muted on bgColor-default 13.44:1 4.5:1
fgColor-default vs. bgColor-success-muted on bgColor-muted 12:1 4.5:1
fgColor-default vs. bgColor-open-muted on bgColor-default 14.28:1 4.5:1
fgColor-default vs. bgColor-open-muted on bgColor-muted 12.85:1 4.5:1
fgColor-default vs. bgColor-danger-muted on bgColor-default 14.49:1 4.5:1
fgColor-default vs. bgColor-danger-muted on bgColor-muted 13.09:1 4.5:1
fgColor-default vs. bgColor-closed-muted on bgColor-default 13.65:1 4.5:1
fgColor-default vs. bgColor-closed-muted on bgColor-muted 12.34:1 4.5:1
fgColor-default vs. bgColor-attention-muted on bgColor-default 13.4:1 4.5:1
fgColor-default vs. bgColor-attention-muted on bgColor-muted 12.08:1 4.5:1
fgColor-default vs. bgColor-severe-muted on bgColor-default 14.45:1 4.5:1
fgColor-default vs. bgColor-severe-muted on bgColor-muted 13.03:1 4.5:1
fgColor-default vs. bgColor-done-muted on bgColor-default 13.11:1 4.5:1
fgColor-default vs. bgColor-done-muted on bgColor-muted 11.71:1 4.5:1
fgColor-default vs. bgColor-sponsors-muted on bgColor-default 14.4:1 4.5:1
fgColor-default vs. bgColor-sponsors-muted on bgColor-muted 12.98:1 4.5:1
fgColor-accent vs. bgColor-default 6.1:1 4.5:1
fgColor-accent vs. bgColor-muted 5.58:1 4.5:1
fgColor-accent vs. bgColor-inset 6.62:1 4.5:1
fgColor-success vs. bgColor-default 7.44:1 4.5:1
fgColor-success vs. bgColor-muted 6.8:1 4.5:1
fgColor-success vs. bgColor-inset 8.08:1 4.5:1
fgColor-open vs. bgColor-default 7.44:1 4.5:1
fgColor-open vs. bgColor-muted 6.8:1 4.5:1
fgColor-open vs. bgColor-inset 8.08:1 4.5:1
fgColor-danger vs. bgColor-default 5.64:1 4.5:1
fgColor-danger vs. bgColor-muted 5.16:1 4.5:1
fgColor-danger vs. bgColor-inset 6.12:1 4.5:1
fgColor-closed vs. bgColor-default 5.64:1 4.5:1
fgColor-closed vs. bgColor-muted 5.16:1 4.5:1
fgColor-closed vs. bgColor-inset 6.12:1 4.5:1
fgColor-attention vs. bgColor-default 7.49:1 4.5:1
fgColor-attention vs. bgColor-muted 6.85:1 4.5:1
fgColor-attention vs. bgColor-inset 8.13:1 4.5:1
fgColor-severe vs. bgColor-default 5.61:1 4.5:1
fgColor-severe vs. bgColor-muted 5.13:1 4.5:1
fgColor-severe vs. bgColor-inset 6.09:1 4.5:1
fgColor-done vs. bgColor-default 6.32:1 4.5:1
fgColor-done vs. bgColor-muted 5.78:1 4.5:1
fgColor-done vs. bgColor-inset 6.86:1 4.5:1
fgColor-sponsors vs. bgColor-default 5.62:1 4.5:1
fgColor-sponsors vs. bgColor-muted 5.14:1 4.5:1
fgColor-sponsors vs. bgColor-inset 6.1:1 4.5:1
fgColor-accent vs. bgColor-accent-muted on bgColor-default 5.46:1 4.5:1
fgColor-success vs. bgColor-success-muted on bgColor-default 6.25:1 4.5:1
fgColor-success vs. bgColor-success-muted on bgColor-muted 5.58:1 4.5:1
fgColor-open vs. bgColor-open-muted on bgColor-default 6.64:1 4.5:1
fgColor-open vs. bgColor-open-muted on bgColor-muted 5.97:1 4.5:1
fgColor-danger vs. bgColor-danger-muted on bgColor-default 5.1:1 4.5:1
fgColor-danger vs. bgColor-danger-muted on bgColor-muted 4.61:1 4.5:1
fgColor-closed vs. bgColor-closed-muted on bgColor-default 4.81:1 4.5:1
fgColor-attention vs. bgColor-attention-muted on bgColor-default 6.27:1 4.5:1
fgColor-attention vs. bgColor-attention-muted on bgColor-muted 5.65:1 4.5:1
fgColor-severe vs. bgColor-severe-muted on bgColor-default 5.06:1 4.5:1
fgColor-severe vs. bgColor-severe-muted on bgColor-muted 4.57:1 4.5:1
fgColor-done vs. bgColor-done-muted on bgColor-default 5.18:1 4.5:1
fgColor-done vs. bgColor-done-muted on bgColor-muted 4.62:1 4.5:1
fgColor-sponsors vs. bgColor-sponsors-muted on bgColor-default 5.06:1 4.5:1
fgColor-sponsors vs. bgColor-sponsors-muted on bgColor-muted 4.56:1 4.5:1
fgColor-onEmphasis vs. bgColor-neutral-emphasis 4.59:1 4.5:1
fgColor-onEmphasis vs. bgColor-accent-emphasis 4.63:1 4.5:1
fgColor-onEmphasis vs. bgColor-success-emphasis 4.63:1 4.5:1
fgColor-onEmphasis vs. bgColor-open-emphasis 4.63:1 4.5:1
fgColor-onEmphasis vs. bgColor-danger-emphasis 4.6:1 4.5:1
fgColor-onEmphasis vs. bgColor-closed-emphasis 4.6:1 4.5:1
fgColor-onEmphasis vs. bgColor-attention-emphasis 4.64:1 4.5:1
fgColor-onEmphasis vs. bgColor-severe-emphasis 4.65:1 4.5:1
fgColor-onEmphasis vs. bgColor-done-emphasis 4.6:1 4.5:1
fgColor-onEmphasis vs. bgColor-sponsors-emphasis 4.57:1 4.5:1
control-borderColor-emphasis vs. bgColor-default 3.66:1 3:1
control-borderColor-emphasis vs. bgColor-muted 3.35:1 3:1

github-actions[bot] avatar Jun 13 '24 12:06 github-actions[bot]

Design Token Diff

/css/functional/themes/dark-colorblind.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/themes/dark-colorblind.css	2024-06-13 20:14:32.738068354 +0000
@@ -168,7 +168,7 @@
 --control-bgColor-disabled: #21262db3;
 --control-bgColor-selected: #161b22;
 --control-fgColor-rest: #c9d1d9;
-  --control-fgColor-placeholder: #484f58;
+  --control-fgColor-placeholder: #858e98;
 --control-fgColor-disabled: #6e7681;
 --control-borderColor-rest: #30363d;
 --control-borderColor-emphasis: #666e79;
@@ -731,7 +731,7 @@
   --control-bgColor-disabled: #21262db3;
   --control-bgColor-selected: #161b22;
   --control-fgColor-rest: #c9d1d9;
-    --control-fgColor-placeholder: #484f58;
+    --control-fgColor-placeholder: #858e98;
   --control-fgColor-disabled: #6e7681;
   --control-borderColor-rest: #30363d;
   --control-borderColor-emphasis: #666e79;

/css/functional/themes/dark-dimmed.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/themes/dark-dimmed.css	2024-06-13 20:14:31.518066954 +0000
@@ -168,7 +168,7 @@
 --control-bgColor-disabled: #373e47b3;
 --control-bgColor-selected: #2d333b;
 --control-fgColor-rest: #adbac7;
-  --control-fgColor-placeholder: #545d68;
+  --control-fgColor-placeholder: #727f8c;
 --control-fgColor-disabled: #636e7b;
 --control-borderColor-rest: #444c56;
 --control-borderColor-emphasis: #606b77;
@@ -731,7 +731,7 @@
   --control-bgColor-disabled: #373e47b3;
   --control-bgColor-selected: #2d333b;
   --control-fgColor-rest: #adbac7;
-    --control-fgColor-placeholder: #545d68;
+    --control-fgColor-placeholder: #727f8c;
   --control-fgColor-disabled: #636e7b;
   --control-borderColor-rest: #444c56;
   --control-borderColor-emphasis: #606b77;

/css/functional/themes/dark-high-contrast.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/themes/dark-high-contrast.css	2024-06-13 20:14:33.354069061 +0000
@@ -168,7 +168,7 @@
 --control-bgColor-disabled: #3d424db3;
 --control-bgColor-selected: #525964;
 --control-fgColor-rest: #f0f3f6;
-  --control-fgColor-placeholder: #7a828e;
+  --control-fgColor-placeholder: #b7bec7;
 --control-fgColor-disabled: #9ea7b3;
 --control-borderColor-rest: #7a828e;
 --control-borderColor-emphasis: #7a828e;
@@ -731,7 +731,7 @@
   --control-bgColor-disabled: #3d424db3;
   --control-bgColor-selected: #525964;
   --control-fgColor-rest: #f0f3f6;
-    --control-fgColor-placeholder: #7a828e;
+    --control-fgColor-placeholder: #b7bec7;
   --control-fgColor-disabled: #9ea7b3;
   --control-borderColor-rest: #7a828e;
   --control-borderColor-emphasis: #7a828e;

/css/functional/themes/dark-tritanopia.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/themes/dark-tritanopia.css	2024-06-13 20:14:32.126067651 +0000
@@ -168,7 +168,7 @@
 --control-bgColor-disabled: #21262db3;
 --control-bgColor-selected: #161b22;
 --control-fgColor-rest: #c9d1d9;
-  --control-fgColor-placeholder: #484f58;
+  --control-fgColor-placeholder: #858e98;
 --control-fgColor-disabled: #6e7681;
 --control-borderColor-rest: #30363d;
 --control-borderColor-emphasis: #666e79;
@@ -731,7 +731,7 @@
   --control-bgColor-disabled: #21262db3;
   --control-bgColor-selected: #161b22;
   --control-fgColor-rest: #c9d1d9;
-    --control-fgColor-placeholder: #484f58;
+    --control-fgColor-placeholder: #858e98;
   --control-fgColor-disabled: #6e7681;
   --control-borderColor-rest: #30363d;
   --control-borderColor-emphasis: #666e79;

/css/functional/themes/dark.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/themes/dark.css	2024-06-13 20:14:30.898066242 +0000
@@ -168,7 +168,7 @@
 --control-bgColor-disabled: #21262db3;
 --control-bgColor-selected: #161b22;
 --control-fgColor-rest: #c9d1d9;
-  --control-fgColor-placeholder: #484f58;
+  --control-fgColor-placeholder: #858e98;
 --control-fgColor-disabled: #6e7681;
 --control-borderColor-rest: #30363d;
 --control-borderColor-emphasis: #666e79;
@@ -731,7 +731,7 @@
   --control-bgColor-disabled: #21262db3;
   --control-bgColor-selected: #161b22;
   --control-fgColor-rest: #c9d1d9;
-    --control-fgColor-placeholder: #484f58;
+    --control-fgColor-placeholder: #858e98;
   --control-fgColor-disabled: #6e7681;
   --control-borderColor-rest: #30363d;
   --control-borderColor-emphasis: #666e79;

/css/functional/themes/light-colorblind.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/themes/light-colorblind.css	2024-06-13 20:14:29.590064739 +0000
@@ -168,7 +168,7 @@
 --control-bgColor-disabled: #eaeef2b3;
 --control-bgColor-selected: #f6f8fa;
 --control-fgColor-rest: #24292f;
-  --control-fgColor-placeholder: #6e7781;
+  --control-fgColor-placeholder: #69727c;
 --control-fgColor-disabled: #8c959f;
 --control-borderColor-rest: #d0d7de;
 --control-borderColor-emphasis: #868f99;
@@ -731,7 +731,7 @@
   --control-bgColor-disabled: #eaeef2b3;
   --control-bgColor-selected: #f6f8fa;
   --control-fgColor-rest: #24292f;
-    --control-fgColor-placeholder: #6e7781;
+    --control-fgColor-placeholder: #69727c;
   --control-fgColor-disabled: #8c959f;
   --control-borderColor-rest: #d0d7de;
   --control-borderColor-emphasis: #868f99;

/css/functional/themes/light-high-contrast.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/themes/light-high-contrast.css	2024-06-13 20:14:30.214065456 +0000
@@ -168,7 +168,7 @@
 --control-bgColor-disabled: #ced5dcb3;
 --control-bgColor-selected: #acb6c0;
 --control-fgColor-rest: #0e1116;
-  --control-fgColor-placeholder: #66707b;
+  --control-fgColor-placeholder: #616a75;
 --control-fgColor-disabled: #66707b;
 --control-borderColor-rest: #20252c;
 --control-borderColor-emphasis: #20252c;
@@ -731,7 +731,7 @@
   --control-bgColor-disabled: #ced5dcb3;
   --control-bgColor-selected: #acb6c0;
   --control-fgColor-rest: #0e1116;
-    --control-fgColor-placeholder: #66707b;
+    --control-fgColor-placeholder: #616a75;
   --control-fgColor-disabled: #66707b;
   --control-borderColor-rest: #20252c;
   --control-borderColor-emphasis: #20252c;

/css/functional/themes/light-tritanopia.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/themes/light-tritanopia.css	2024-06-13 20:14:28.970064204 +0000
@@ -168,7 +168,7 @@
 --control-bgColor-disabled: #eaeef2b3;
 --control-bgColor-selected: #f6f8fa;
 --control-fgColor-rest: #24292f;
-  --control-fgColor-placeholder: #6e7781;
+  --control-fgColor-placeholder: #69727c;
 --control-fgColor-disabled: #8c959f;
 --control-borderColor-rest: #d0d7de;
 --control-borderColor-emphasis: #868f99;
@@ -731,7 +731,7 @@
   --control-bgColor-disabled: #eaeef2b3;
   --control-bgColor-selected: #f6f8fa;
   --control-fgColor-rest: #24292f;
-    --control-fgColor-placeholder: #6e7781;
+    --control-fgColor-placeholder: #69727c;
   --control-fgColor-disabled: #8c959f;
   --control-borderColor-rest: #d0d7de;
   --control-borderColor-emphasis: #868f99;

/css/functional/themes/light.css

+++ /home/runner/work/primitives/primitives/dist/css/functional/themes/light.css	2024-06-13 20:14:28.126064246 +0000
@@ -168,7 +168,7 @@
 --control-bgColor-disabled: #eaeef2b3;
 --control-bgColor-selected: #f6f8fa;
 --control-fgColor-rest: #24292f;
-  --control-fgColor-placeholder: #6e7781;
+  --control-fgColor-placeholder: #69727c;
 --control-fgColor-disabled: #8c959f;
 --control-borderColor-rest: #d0d7de;
 --control-borderColor-emphasis: #868f99;
@@ -731,7 +731,7 @@
   --control-bgColor-disabled: #eaeef2b3;
   --control-bgColor-selected: #f6f8fa;
   --control-fgColor-rest: #24292f;
-    --control-fgColor-placeholder: #6e7781;
+    --control-fgColor-placeholder: #69727c;
   --control-fgColor-disabled: #8c959f;
   --control-borderColor-rest: #d0d7de;
   --control-borderColor-emphasis: #868f99;

github-actions[bot] avatar Jun 13 '24 13:06 github-actions[bot]