@@ -1524,4 +1524,63 @@ span + .btn-background {
15241524.orbit-caption {
15251525 color : var (--primary-light-color );
15261526 background-color : color-mix (in srgb , var (--primary-dark-color ) 90% , transparent );
1527- }
1527+ }
1528+
1529+ /*
1530+ * WCAG 2.4.7 Focus Visible - Two-Color Focus Indicator (Technique C40)
1531+ * Requires at least 1:9 contrast ratio between the two focus colours.
1532+ */
1533+ :root {
1534+ --focus-light : #F9F9F9 ;
1535+ --focus-dark : #193146 ;
1536+ --focus-ring-size : 4px ;
1537+ }
1538+
1539+ /* Prevent layout shifts */
1540+ /* Inline links override to prevent layout shifts without affecting typography */
1541+ p a ,
1542+ span a ,
1543+ li a {
1544+ margin : calc (-1 * var (--focus-ring-size ));
1545+ padding : var (--focus-ring-size );
1546+ box-sizing : border-box ;
1547+ }
1548+
1549+ p a ,
1550+ span a {
1551+ display : inline-block ;
1552+ }
1553+
1554+
1555+ /* General */
1556+ * :focus-visible {
1557+ outline : 2px var (--focus-light ) solid ;
1558+ outline-offset : 0 ;
1559+ box-shadow : 0 0 0 var (--focus-ring-size ) var (--focus-dark );
1560+ }
1561+
1562+ /* focus bounding boxes */
1563+ a :focus-visible {
1564+ outline : 2px var (--focus-light ) solid ;
1565+ outline-offset : 0 ;
1566+ box-shadow : 0 0 0 var (--focus-ring-size ) var (--focus-dark );
1567+ display : inline-block ;
1568+ white-space : normal ;
1569+ }
1570+
1571+ input [type = " text" ]:focus-visible ,
1572+ input [type = " textarea" ].tinymce :focus-visible ,
1573+ input [type = " email" ]:focus-visible ,
1574+ input [type = " password" ]:focus-visible ,
1575+ input [type = " search" ]:focus-visible ,
1576+ input [type = " number" ]:focus-visible ,
1577+ input [type = " date" ]:focus-visible ,
1578+ input [type = " datetime-local" ]:focus-visible ,
1579+ input [type = " file" ]:focus-visible ,
1580+ input [type = " submit" ]:focus-visible {
1581+ outline : 2px var (--focus-light ) solid ;
1582+ outline-offset : 0 ;
1583+ box-shadow : 0 0 0 var (--focus-ring-size ) var (--focus-dark );
1584+ }
1585+
1586+ /* end of WCAG 2.4.7 Focus Visible - Two-Color Focus Indicator (Technique C40) */
0 commit comments