From 32dbfc2653ce6fbc13a7f9e63c0fa207f1f5b340 Mon Sep 17 00:00:00 2001 From: Lukas Oppermann Date: Thu, 16 Jan 2025 14:02:47 +0100 Subject: [PATCH 1/4] add overwrite for borderColor-closed-muted in Dark Protanopia --- src/tokens/functional/color/borderColor.json5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tokens/functional/color/borderColor.json5 b/src/tokens/functional/color/borderColor.json5 index e193d0649..8582cd570 100644 --- a/src/tokens/functional/color/borderColor.json5 +++ b/src/tokens/functional/color/borderColor.json5 @@ -474,6 +474,10 @@ $value: '{borderColor.default}', alpha: 0.4, }, + 'dark-protanopia-deuteranopia': { + $value: '{borderColor.default}', + alpha: 0.4, + }, }, }, }, From 39c262a6d514621c2ab4610b7e8ae9eb3717c637 Mon Sep 17 00:00:00 2001 From: Lukas Oppermann Date: Thu, 16 Jan 2025 15:26:13 +0100 Subject: [PATCH 2/4] fix for fgColor open to be same as success for tritanopia --- .changeset/famous-masks-itch.md | 5 +++++ src/tokens/functional/color/fgColor.json5 | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 .changeset/famous-masks-itch.md diff --git a/.changeset/famous-masks-itch.md b/.changeset/famous-masks-itch.md new file mode 100644 index 000000000..ca3c9f2bf --- /dev/null +++ b/.changeset/famous-masks-itch.md @@ -0,0 +1,5 @@ +--- +'@primer/primitives': patch +--- + +Fix a11y border issue for dark colorblind and adjust tritanopia open color to be the same as success diff --git a/src/tokens/functional/color/fgColor.json5 b/src/tokens/functional/color/fgColor.json5 index 0965ee500..569b62c0b 100644 --- a/src/tokens/functional/color/fgColor.json5 +++ b/src/tokens/functional/color/fgColor.json5 @@ -198,12 +198,6 @@ web: 'var(--fgColor-open) /* utility class: .color-fg-open */', }, }, - 'org.primer.overrides': { - "dark-protanopia-deuteranopia": '{base.color.blue.3}', - 'light-protanopia-deuteranopia': '{base.color.blue.5}', - "dark-tritanopia": '{base.color.red.4}', - "light-tritanopia": '{base.color.red.5}', - }, }, }, attention: { From 016fce2ad491b90c27a1eeff49aadb7f6b6601c2 Mon Sep 17 00:00:00 2001 From: Lukas Oppermann Date: Fri, 17 Jan 2025 10:49:57 +0100 Subject: [PATCH 3/4] set tritanopia dark and light open color to reference success color --- src/tokens/functional/color/bgColor.json5 | 11 ----------- src/tokens/functional/color/borderColor.json5 | 14 -------------- 2 files changed, 25 deletions(-) diff --git a/src/tokens/functional/color/bgColor.json5 b/src/tokens/functional/color/bgColor.json5 index 12437038e..a69bab411 100644 --- a/src/tokens/functional/color/bgColor.json5 +++ b/src/tokens/functional/color/bgColor.json5 @@ -294,13 +294,6 @@ web: 'var(--bgColor-success-muted) /* utility class: .color-bg-success */', }, }, - 'org.primer.overrides': { - 'light-tritanopia': '{base.color.red.0}', - 'dark-tritanopia': { - $value: '{base.color.red.4}', - alpha: 0.1, - }, - }, }, }, emphasis: { @@ -315,10 +308,6 @@ web: 'var(--bgColor-success-emphasis) /* utility class: .color-bg-success-emphasis */', }, }, - 'org.primer.overrides': { - 'light-tritanopia': '{base.color.red.5}', - 'dark-tritanopia': '{base.color.red.5}', - }, }, }, }, diff --git a/src/tokens/functional/color/borderColor.json5 b/src/tokens/functional/color/borderColor.json5 index 8582cd570..c9ba9294c 100644 --- a/src/tokens/functional/color/borderColor.json5 +++ b/src/tokens/functional/color/borderColor.json5 @@ -270,16 +270,6 @@ web: 'var(--borderColor-open-muted) /* utility class: .color-border-open */', }, }, - 'org.primer.overrides': { - 'dark-tritanopia': { - $value: '{base.color.red.4}', - alpha: 0.4, - }, - 'light-tritanopia': { - $value: '{base.color.red.3}', - alpha: 0.4, - }, - }, }, }, emphasis: { @@ -294,10 +284,6 @@ web: 'var(--borderColor-open-emphasis) /* utility class: .color-border-open-emphasis */', }, }, - 'org.primer.overrides': { - 'dark-tritanopia': '{base.color.red.5}', - 'light-tritanopia': '{base.color.red.5}', - }, }, }, }, From 6cca25b4da1d11b20d25e0e34514426dbbf9fc63 Mon Sep 17 00:00:00 2001 From: lukasoppermann <813754+lukasoppermann@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:55:29 +0000 Subject: [PATCH 4/4] github-actions[bot] Regenerated snapshots --- ...k-tritanopia-bgColor-open-emphasis-linux.png | Bin 831 -> 749 bytes ...itanopia-borderColor-open-emphasis-linux.png | Bin 871 -> 790 bytes ...-tritanopia-borderColor-open-muted-linux.png | Bin 859 -> 767 bytes ...tches-dark-tritanopia-fgColor-open-linux.png | Bin 838 -> 756 bytes ...t-tritanopia-bgColor-open-emphasis-linux.png | Bin 838 -> 738 bytes ...itanopia-borderColor-open-emphasis-linux.png | Bin 884 -> 776 bytes ...ches-light-tritanopia-fgColor-open-linux.png | Bin 838 -> 738 bytes 7 files changed, 0 insertions(+), 0 deletions(-) diff --git a/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-dark-tritanopia-bgColor-open-emphasis-linux.png b/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-dark-tritanopia-bgColor-open-emphasis-linux.png index 6f8122e8ee5fddfc05b76fb888d9c0cae7a14159..c54e94ee6439db7b2cf7bfd8c9f3f47e59a6dbe2 100644 GIT binary patch literal 749 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!S8*@_$r+7LgMk!dage(c!@6@aFBuq^mV3H5 zhE&XXd(A#;GNVj;;e8X+`i!<~PHlO5atAy=a?Cp>y`x+FQs5ks^9wGxZsIgEk+OB( zWRw5md2y4zeZ>RwHG0?k8_q3}W8k05p{VB6(J7Fm)G~ugOyAdx%hQea$Jx{u*L^NB z+P`jl&xyL-H}BT%`~9nK|J^ImerImx6b9y77@ii-Pxp`Kznp5D64UmwsOoD@#JX~O zJD`f5@-GR`&DX!;eEihHUEtwCwf^w0Egy^KD0fiPrBwAcEe*4|@$X-_ZQ>r8=Nw8l zH{N{BzFYtOzrR0Y^DPYzzbcB& uZ(u)b&1ER) literal 831 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!S8=cbN%6-;EI^8}ILO_JVcj{ImkbO{KRsO> zLn`LHz3%8WHBhGg;o|wso_VTLd9Jq{n!jCIkl3B^V9}waESV~a7B8x9AK;xc_x)45 z^IUa*`1cg_nLQ8R%_vY{Q_XO|n^SCpVuV9m0;6OTYYGPqILA)DVSH1*Q>Nd4dj7Gm zH(&0En0B+6@6g{e>pc1S$Ijk8yyLdr`FV%snzjbbzrR;j-fVr^c?%8k(?)jt?4;G* z-5;O+K7aG`4ek05z4q3ZT2&u9SoHg=(3+{YbmparZI9R2XQqj>X&55(Hu{>^-+RCy zF4%CVZZAvr(tUp`XW2eX*!j0=?islQb@BCor0UCe7uJ?p=}k-hHmA8@|J}aZ$Cnot ye>bS+`d_%ka{sNfa*Q8@_O;M5nGhK$$Lz}$bfb06{91rHg2B_(&t;ucLK6TpFB72v diff --git a/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-dark-tritanopia-borderColor-open-emphasis-linux.png b/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-dark-tritanopia-borderColor-open-emphasis-linux.png index ec3535facaa5fe050827ac6ac7455a4416a58cb6..c3f4816275c6b6ad3bad36c310d300b4393c4af6 100644 GIT binary patch literal 790 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!S8*@_$r+7LgMk!dage(c!@6@aFBuq^E_k{) zhE&XXd)?44BvHaGF>Qt*+rowfg@v0pZrp6Juz>kpqw5Zq?8izmZQtC4w%-vNqGL{=e57fC*Sn5P2rh* z^W2*U2cNwA`1R;(pbi`N>qXC>c-kh~e13fVYl~q=f$rp;(iO><-~O#SB=JZ1-i`0! z{I5CxZ)x8Ax$00t43*qY)qtS4VK>&u8O#HP2h)Gi=>@v0pY~TBs;Jpw+F77`J^uc6 z;bX;rpT^oI^30CzzFT#e;a|;flh`}6bL9P=bwlDPUOa!D-JTmiYD4oS52WP(UvZCN s`>f|0M_f1z1)Y3a1cVi-%lyZ*dbhsYRJRN*U_xi`boFyt=akR{05EbXrvLx| literal 871 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!S8=cbN%6-;EI^8}ILO_JVcj{ImkbQdik>cx zAr*7pUN`g$4U}-Z$oyVaiKTVH!iA+QVmBh9EyTIK*%J>gxzZ$fBWgy68}}kLyNwqP zISK75E|1A(i7%Q|`+on{`idG;2BvN4{0uuZ4>B3CaGwy+QE=YSz(Wg8#Cf>``QO8C zKfbwl_v4HA&RImQO*^01^RaNVuBA18e-{wC9wpnL4|Z}!J0|Gj%7`R8fI zRw@7YZ+gF8yH@e>-{m)!Jn9dVZ0_BjY1^1R=iWZkYNmRQYff+Ss=Jn2MOa^)e#mo2 z0RR1cvuz*lFZ=f(`njxgN@xNA^0hiZ diff --git a/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-dark-tritanopia-borderColor-open-muted-linux.png b/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-dark-tritanopia-borderColor-open-muted-linux.png index eefd4f416df03a72b537cd7f49f9d0c7f5eef313..e9d9ef90c73e3dbc7b50b428f334d26fa7d9a76e 100644 GIT binary patch literal 767 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!S8*@_$r+7LgMk!dage(c!@6@aFBuq^c6z!v zhE&XXd)+Z>vLi!V;(vS3+gH*ihE8pIz}uzGfBA9cyhoB;u7$~tOOGCVA?OpnK6(Cg z7I|iUW8>Uy&-EM5#qc*g_iGUlRy^XuVJPV2LnY?4uMLK0PEY=NbobL|U-!gZk7nC& z|L*&JwY&E3z4u=3l`eCH%=+`Mc$qC~KmW`4T{bKH>jXoe&siJqopWE_UvB<&8e>JD zT*}s+E7W_^e|`$JP2^FsIkBaH-R|ZdtCi|K2j_n{xv%a|fd7x>x%%s0aW)qUQ_bmA z4F~!f1`PF&IiT?P6Mmc zt+I^D5meVG0JnmrZ2vub}XzGq~(`*6+vdj^L6=i=^H|EV#1bJh7+s@WUe z_w)J6-_=>yhv(0fc>m&9pWpmz!pBY*Zc{kadv})pYtF|{EusY!kGOCc3Of0;2ndfH z=8lc~>-C@k@bFmJeETclfZ1Su=KE`2;m@yMFHbDAxMMeuxBBZe!N~Zv`{wW8U-9|V u{a@vKQ;4&%eLl*DwD1 zrZL~8>A%}QzP#Ok)A+_=?;Qd1*U~qu%jj&6*E<-s;`;G@UnB3-?PTFTA)uq+yrF^T zAd}H32TK^NY5n#0k4^QVgGIle3IRF4K3G6FR`YBd{;u2iU*>#$8P=HDy!?YaII+AD jWYB-8$}$MT_aBo+r9s{%ZS@7fjKSdP>gTe~DWM4fGNB}P diff --git a/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-light-tritanopia-bgColor-open-emphasis-linux.png b/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-light-tritanopia-bgColor-open-emphasis-linux.png index dbb48d037f49dab4da546f3c435afa9041d6843b..b54c1e8419997e89e851b81b06fbf340df93f256 100644 GIT binary patch literal 738 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!S8*@_$r+7LgMk!dage(c!@6@aFBuq^=6Jd| zhE&XXd)Lq_CQ+g-P(4{eBia0sn95RbftUuB+*vxxTYbMxP}{nr;ed`}Y6176xy~wQ zpQN#BzB4($x8fXEoL$9(_y3L>@US~P_qAn+vlevnX%P@sJmSJ(NF}EA8ul~i4}X4l z`tIdt|DG1^UcKGt#LKM8%DR%`y>`}-*P_$X9!|cn(XO_7$KRc6!+ox_cVGQ}KK*Og z%#Sj%Z;!9P|Fz|1(Hz^3f-TSO>tAzTeri!IKuz~i)w8rT%;MHbYxm#!$8R=I?k)TJ zZ^t}?*uKr}hpP_!srkF3Znw>iJNs?&%D+zIw2al&Ki{9X?)ujWKO=b#2jn+|pDh+i nQfisOp{VB6(J4R==6{BX6$Yl4{3me(6D@zp>KV)_5;*Qc*vK0jW5 z(fHe?X7TgO)#dN?&O68#cWCObuRl+};H*CV_PY0muvh2LzP~8^ZQAYi(`n~;8ios9 zjouo>e!F_H`WxNt@%jg&R{lOeuW#Ol?RV<-KD)?#}%{;*KPB!g!IlZ>b5E(Q(( zmJ&6`DT&9>Jo4c5$$KoHud=?KV>Z3vT$n9`o|T}JPm6%C;t>}PLn<+EuVe3d zc>4V2!`JWMlUu+4pVjK^JPA9k_m>wJekpi=Yii}*R0d;v&bg0HcAsBwH|Lr*+vgYG zo=*2)e_fmHfu+^S+5M}l4prQ%kGd{=OyQ7c*#5oZ=iVNFheAR>Z-!>B@Yyp*Zsft=*7V}+Z3M7XVZf78@SIFizF$v%-~Q| hbL!|6pf0nX(b&wS-{zrRA24Y%c)I$ztaD0e0suN22jTz# literal 884 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!S8=cbN%6-;EI^8}ILO_JVcj{ImkbQddY&$h zAr*7p-muOJ4U}kmC~BJW8Mz4 zUu-i-WqNt7@?)jjhl6d?zrOEHjhx0PP>}PDp<%I*j)L=s2A+dVMl9SX1ZcqNx%!6j z&*twhKmYjg;Np$ik5zAKZ_c!BH$3+0%gT+Fe^1@mRi3`)+&r+*u}wOs-w5`6eE99| z$G0ah-!!&3a5CEb_|N0~>E{zHIIkb;Pd}gT|3F~(`g>>Q9k4qXC0t+kZo}TWXFn@A^@0{KBhszCW#DN`u)M}k#0Vzs^)7L QFdH#=y85}Sb4q9e07~#ZJ^%m! diff --git a/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-light-tritanopia-fgColor-open-linux.png b/.playwright/snapshots/storybook.test.ts-snapshots/storybook-all-color-swatches-light-tritanopia-fgColor-open-linux.png index dbb48d037f49dab4da546f3c435afa9041d6843b..b54c1e8419997e89e851b81b06fbf340df93f256 100644 GIT binary patch literal 738 zcmeAS@N?(olHy`uVBq!ia0y~yVAKJ!S8*@_$r+7LgMk!dage(c!@6@aFBuq^=6Jd| zhE&XXd)Lq_CQ+g-P(4{eBia0sn95RbftUuB+*vxxTYbMxP}{nr;ed`}Y6176xy~wQ zpQN#BzB4($x8fXEoL$9(_y3L>@US~P_qAn+vlevnX%P@sJmSJ(NF}EA8ul~i4}X4l z`tIdt|DG1^UcKGt#LKM8%DR%`y>`}-*P_$X9!|cn(XO_7$KRc6!+ox_cVGQ}KK*Og z%#Sj%Z;!9P|Fz|1(Hz^3f-TSO>tAzTeri!IKuz~i)w8rT%;MHbYxm#!$8R=I?k)TJ zZ^t}?*uKr}hpP_!srkF3Znw>iJNs?&%D+zIw2al&Ki{9X?)ujWKO=b#2jn+|pDh+i nQfisOp{VB6(J4R==6{BX6$Yl4{3me(6D@zp>KV)_5;*Qc*vK0jW5 z(fHe?X7TgO)#dN?&O68#cWCObuRl+};H*CV_PY0muvh2LzP~8^ZQAYi(`n~;8ios9 zjouo>e!F_H`WxNt@%jg&R{lOeuW#Ol?RV<-KD)?#