@@ -1654,4 +1654,63 @@ span + .btn-background {
16541654.orbit-caption {
16551655 color : var (--primary-light-color );
16561656 background-color : color-mix (in srgb , var (--primary-dark-color ) 90% , transparent );
1657- }
1657+ }
1658+
1659+ /*
1660+ * WCAG 2.4.7 Focus Visible - Two-Color Focus Indicator (Technique C40)
1661+ * Requires at least 1:9 contrast ratio between the two focus colours.
1662+ */
1663+ :root {
1664+ --focus-light : #F9F9F9 ;
1665+ --focus-dark : #193146 ;
1666+ --focus-ring-size : 4px ;
1667+ }
1668+
1669+ /* Prevent layout shifts */
1670+ /* Inline links override to prevent layout shifts without affecting typography */
1671+ p a ,
1672+ span a ,
1673+ li a {
1674+ margin : calc (-1 * var (--focus-ring-size ));
1675+ padding : var (--focus-ring-size );
1676+ box-sizing : border-box ;
1677+ }
1678+
1679+ p a ,
1680+ span a {
1681+ display : inline-block ;
1682+ }
1683+
1684+
1685+ /* General */
1686+ * :focus-visible {
1687+ outline : 2px var (--focus-light ) solid ;
1688+ outline-offset : 0 ;
1689+ box-shadow : 0 0 0 var (--focus-ring-size ) var (--focus-dark );
1690+ }
1691+
1692+ /* focus bounding boxes */
1693+ a :focus-visible {
1694+ outline : 2px var (--focus-light ) solid ;
1695+ outline-offset : 0 ;
1696+ box-shadow : 0 0 0 var (--focus-ring-size ) var (--focus-dark );
1697+ display : inline-block ;
1698+ white-space : normal ;
1699+ }
1700+
1701+ input [type = " text" ]:focus-visible ,
1702+ input [type = " textarea" ].tinymce :focus-visible ,
1703+ input [type = " email" ]:focus-visible ,
1704+ input [type = " password" ]:focus-visible ,
1705+ input [type = " search" ]:focus-visible ,
1706+ input [type = " number" ]:focus-visible ,
1707+ input [type = " date" ]:focus-visible ,
1708+ input [type = " datetime-local" ]:focus-visible ,
1709+ input [type = " file" ]:focus-visible ,
1710+ input [type = " submit" ]:focus-visible {
1711+ outline : 2px var (--focus-light ) solid ;
1712+ outline-offset : 0 ;
1713+ box-shadow : 0 0 0 var (--focus-ring-size ) var (--focus-dark );
1714+ }
1715+
1716+ /* end of WCAG 2.4.7 Focus Visible - Two-Color Focus Indicator (Technique C40) */
0 commit comments