Skip to content

Commit

Permalink
feat: add role of checkbox group and radio group
Browse files Browse the repository at this point in the history
  • Loading branch information
shervinchen committed May 6, 2024
1 parent 390d011 commit f5dc8fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/Checkbox/CheckboxGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ const CheckboxGroup: FC<PropsWithChildren<CheckboxGroupProps>> = ({

return (
<CheckboxGroupContext.Provider value={checkboxGroupConfig}>
<div className={classes} {...restProps} data-testid="checkboxGroup">
<div
role="group"
className={classes}
{...restProps}
data-testid="checkboxGroup"
>
{children}
<style jsx>{`
.raw-checkbox-group {
Expand Down
2 changes: 1 addition & 1 deletion packages/Radio/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const RadioGroup: FC<PropsWithChildren<RadioGroupProps>> = ({

return (
<RadioGroupContext.Provider value={radioGroupConfig}>
<div className={classes} {...restProps}>
<div role="radiogroup" className={classes} {...restProps}>
{children}
<style jsx>{`
.raw-radio-group {
Expand Down

0 comments on commit f5dc8fa

Please sign in to comment.