From b0667d73cd7c76030a0bf255eb80facb1fccae9a Mon Sep 17 00:00:00 2001 From: norddinh Date: Wed, 4 Dec 2024 16:34:01 +0100 Subject: [PATCH 1/3] a11y checkbox/radio --- packages/react/components/checkbox/Checkbox.tsx | 3 +-- .../components/checkbox/tiles/tile/CheckboxTile.tsx | 3 +-- packages/react/components/radio/Radio.tsx | 3 +-- .../react/components/radio/tiles/tile/RadioTile.tsx | 3 +-- .../styles/framework/src/components/_autolayout.scss | 10 ++++++++-- packages/styles/framework/src/utilities/_mixins.scss | 10 +++++++++- packages/styles/scripts/autolayout.ts | 4 +++- 7 files changed, 24 insertions(+), 12 deletions(-) diff --git a/packages/react/components/checkbox/Checkbox.tsx b/packages/react/components/checkbox/Checkbox.tsx index 4799aa46..15256349 100644 --- a/packages/react/components/checkbox/Checkbox.tsx +++ b/packages/react/components/checkbox/Checkbox.tsx @@ -41,9 +41,8 @@ const Checkbox = ({ }, [checked, readonly]) return ( -
+
+
+
+
Date: Wed, 4 Dec 2024 17:10:47 +0100 Subject: [PATCH 2/3] Fix a11y switch --- packages/styles/framework/src/elements/_switch.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/styles/framework/src/elements/_switch.scss b/packages/styles/framework/src/elements/_switch.scss index 18dfaa36..7567c4bb 100644 --- a/packages/styles/framework/src/elements/_switch.scss +++ b/packages/styles/framework/src/elements/_switch.scss @@ -8,8 +8,13 @@ } input { - display: none; + opacity: 0; + position: absolute; + outline: none; + &:focus-visible ~ label:before{ + outline: 2px solid; + } &:disabled ~ label, &:disabled:checked ~ label { cursor: not-allowed; From b9277a7490b8652fdfa7ddd700de3061d0ce266d Mon Sep 17 00:00:00 2001 From: norddinh Date: Wed, 4 Dec 2024 17:29:18 +0100 Subject: [PATCH 3/3] Fix ghost button --- packages/styles/framework/src/elements/_button.scss | 5 +++++ packages/styles/framework/src/theming/buttons_partial.scss | 2 +- packages/styles/framework/src/utilities/_colors.scss | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/styles/framework/src/elements/_button.scss b/packages/styles/framework/src/elements/_button.scss index 36117556..b9274963 100644 --- a/packages/styles/framework/src/elements/_button.scss +++ b/packages/styles/framework/src/elements/_button.scss @@ -53,6 +53,11 @@ $button-border-width: 2px !default; } } + &.is-ghost:hover { + background-color: var(--color-main-fade); + filter: none !important; + } + &[disabled], &[aria-disabled=true] { background-color: getColorValue('main-fade') !important; diff --git a/packages/styles/framework/src/theming/buttons_partial.scss b/packages/styles/framework/src/theming/buttons_partial.scss index d88b5a34..3922b3ee 100644 --- a/packages/styles/framework/src/theming/buttons_partial.scss +++ b/packages/styles/framework/src/theming/buttons_partial.scss @@ -10,7 +10,7 @@ $button-colors: ( 'accent':['conversion', 'accent', 'background'], 'primary': ['primary', 'main', 'background'], 'secondary': ['secondary', 'main-fade', 'main'], - 'ghost': ['ghost', 'background', 'main'], + 'ghost': ['ghost', 'transparent', 'main'] ) !default; %buttons-states { diff --git a/packages/styles/framework/src/utilities/_colors.scss b/packages/styles/framework/src/utilities/_colors.scss index 8fabdc6d..3b163158 100644 --- a/packages/styles/framework/src/utilities/_colors.scss +++ b/packages/styles/framework/src/utilities/_colors.scss @@ -11,6 +11,7 @@ $suffix: ''; */ $colors: ( 'background': [#fff, 'white', 'main'], + 'transparent': ['transparent', 'transparent', 'transparent'], 'main':[ #3d5d7e, 'main', 'white'], 'main-fade':[ #eff2f8, 'main-fade', 'white'], 'accent':[ #da641b,'accent', 'white'],