From 37d4c8defff6e7ec186f08ade563a2413f89f8fb Mon Sep 17 00:00:00 2001 From: Ezequiel Victorero Date: Tue, 4 Jul 2023 09:10:42 -0300 Subject: [PATCH] A11y: Add support for toggle buttons in high contrast mode (#70838) --- packages/grafana-ui/src/components/Switch/Switch.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/grafana-ui/src/components/Switch/Switch.tsx b/packages/grafana-ui/src/components/Switch/Switch.tsx index ca9cb11ff64..e5e2a487807 100644 --- a/packages/grafana-ui/src/components/Switch/Switch.tsx +++ b/packages/grafana-ui/src/components/Switch/Switch.tsx @@ -143,6 +143,10 @@ const getSwitchStyles = stylesFactory((theme: GrafanaTheme2, transparent?: boole top: 50%; transform: translate3d(2px, -50%, 0); transition: transform 0.2s cubic-bezier(0.19, 1, 0.22, 1); + + @media (forced-colors: active) { + border: 1px solid transparent; + } } } `,