@thecb/components 9.2.10-beta.11 → 9.2.10-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "9.2.10-beta.11",
3
+ "version": "9.2.10-beta.13",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -127,8 +127,8 @@ const Checkbox = ({
127
127
  id={`checkbox-${name}`}
128
128
  disabled={disabled}
129
129
  name={name}
130
- aria-label={checkboxAriaLabel || `${title} checkbox`}
131
130
  checked={checked}
131
+ hidden={true}
132
132
  onChange={onChange}
133
133
  tabIndex="-1"
134
134
  aria-invalid={error}
@@ -150,6 +150,10 @@ const Checkbox = ({
150
150
  disabledStyles={themeValues.disabledStyles}
151
151
  disabledCheckedStyles={themeValues.disabledCheckedStyles}
152
152
  focusedStyles={themeValues.focusedStyles}
153
+ aria-describedby={error ? `${name}-error-message` : ""}
154
+ aria-labelledby={
155
+ !checkboxAriaLabel ? `${name}_checkbox_title` : undefined
156
+ }
153
157
  {...checkboxProps}
154
158
  >
155
159
  <CheckboxIcon
@@ -165,6 +169,7 @@ const Checkbox = ({
165
169
  {title && (
166
170
  <Text
167
171
  variant="p"
172
+ id={`${name}_checkbox_title`}
168
173
  weight={themeValues.textFontWeight}
169
174
  color={themeValues.textColor}
170
175
  extraStyles={
@@ -21,7 +21,7 @@ export const checkbox = () => (
21
21
  focused={boolean("focused", false, "props")}
22
22
  checkboxAriaLabel={text(
23
23
  "checkboxAriaLabel",
24
- "Checkbox Label Prop",
24
+ "CheckboxAriaLabel Prop",
25
25
  groupId
26
26
  )}
27
27
  />
@@ -24,7 +24,7 @@ const TermsAndConditionsControlV1 = ({
24
24
  error={error}
25
25
  checked={isChecked}
26
26
  onChange={onCheck}
27
- aria-label={checkboxAriaLabel}
27
+ checkboxAriaLabel={checkboxAriaLabel}
28
28
  />
29
29
  <Box padding="0 0 0 58px">
30
30
  <Stack>
@@ -59,7 +59,7 @@ const TermsAndConditionsControlV2 = ({
59
59
  onChange={onCheck}
60
60
  checkboxMargin={checkboxMargin}
61
61
  extraStyles={`align-self: flex-start;`}
62
- aria-label={checkboxAriaLabel}
62
+ checkboxAriaLabel={checkboxAriaLabel}
63
63
  />
64
64
  )}
65
65
  <Stack childGap="0.25rem" fullHeight>