From 4b9fe8d3a869e26d7a758adbb0a51067d3a82671 Mon Sep 17 00:00:00 2001 From: Airike Jaska <95303654+airikej@users.noreply.github.com> Date: Mon, 16 Feb 2026 13:32:10 +0200 Subject: [PATCH] fix(choice-group): segmented item borders and focus behaviour #101 --- .../form/choice-group/choice-group.tsx | 6 +- .../choice-group-item.module.scss | 80 ++++++++++++++----- .../choice-group-item/choice-group-item.tsx | 11 ++- 3 files changed, 74 insertions(+), 23 deletions(-) diff --git a/src/tedi/components/form/choice-group/choice-group.tsx b/src/tedi/components/form/choice-group/choice-group.tsx index e2ade8d04..e3856bba7 100644 --- a/src/tedi/components/form/choice-group/choice-group.tsx +++ b/src/tedi/components/form/choice-group/choice-group.tsx @@ -67,7 +67,7 @@ export const ChoiceGroup = (props: ChoiceGroupProps): React.ReactElement => { indeterminateCheck, indeterminateCheckProps = {}, color, - layout, + layout = 'separated', showIndicator, ...rest } = getCurrentBreakpointProps(props); @@ -188,8 +188,8 @@ export const ChoiceGroup = (props: ChoiceGroupProps): React.ReactElement => { )} -
+
{variant === 'default' || showIndicator ? ( { onChangeHandler(value, e.target.checked); }} - className={styles['tedi-choice-group-item__input']} + className="visually-hidden" role={type === 'radio' ? 'radio' : undefined} aria-checked={isChecked} + tabIndex={-1} />