@thecb/components 9.2.10-beta.15 → 9.2.10-beta.17

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.15",
3
+ "version": "9.2.10-beta.17",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -33,7 +33,7 @@ const CheckboxIcon = styled.svg`
33
33
  const HiddenCheckbox = styled.input.attrs({ type: "checkbox" })`
34
34
  border: 0;
35
35
  clip: rect(0 0 0 0);
36
- clip-path: inset(50%);
36
+ clippath: inset(50%);
37
37
  height: 1px;
38
38
  margin: -1px;
39
39
  overflow: hidden;
@@ -95,8 +95,7 @@ const Checkbox = ({
95
95
  checkboxMargin = "0 16px 0 0",
96
96
  extraStyles,
97
97
  textExtraStyles,
98
- dataQa = null,
99
- checkboxAriaLabel = ""
98
+ dataQa = null
100
99
  }) => {
101
100
  const [focused, setFocused] = useState(false);
102
101
 
@@ -123,17 +122,15 @@ const Checkbox = ({
123
122
  id={`checkbox-${name}`}
124
123
  disabled={disabled}
125
124
  name={name}
125
+ aria-label={name}
126
126
  checked={checked}
127
127
  onChange={onChange}
128
128
  tabIndex="-1"
129
129
  aria-invalid={error}
130
130
  aria-describedby={error ? `${name}-error-message` : ""}
131
- aria-hidden={true}
132
131
  />
133
132
  <StyledCheckbox
134
133
  role="checkbox"
135
- aria-invalid={error}
136
- aria-describedby={error ? `${name}-error-message` : ""}
137
134
  error={error}
138
135
  disabled={disabled}
139
136
  checked={checked}
@@ -145,7 +142,6 @@ const Checkbox = ({
145
142
  disabledStyles={themeValues.disabledStyles}
146
143
  disabledCheckedStyles={themeValues.disabledCheckedStyles}
147
144
  focusedStyles={themeValues.focusedStyles}
148
- aria-label={checkboxAriaLabel}
149
145
  >
150
146
  <CheckboxIcon
151
147
  viewBox="0 0 24 24"
@@ -31,7 +31,6 @@ export const termsAndConditions = () => (
31
31
  terms={<Terms />}
32
32
  error={boolean("error", false, groupId)}
33
33
  initialFocusSelector={text("initialFocusSelector", "#focus-me", groupId)}
34
- checkboxAriaLabel="I agree to the Terms and Conditions"
35
34
  />
36
35
  );
37
36
 
@@ -11,8 +11,7 @@ const TermsAndConditionsControlV1 = ({
11
11
  terms,
12
12
  error = false,
13
13
  linkVariant,
14
- initialFocusSelector = "",
15
- checkboxAriaLabel = ""
14
+ initialFocusSelector = ""
16
15
  }) => {
17
16
  const [showTerms, toggleShowTerms] = useState(false);
18
17
  return (
@@ -24,7 +23,6 @@ const TermsAndConditionsControlV1 = ({
24
23
  error={error}
25
24
  checked={isChecked}
26
25
  onChange={onCheck}
27
- checkboxAriaLabel={checkboxAriaLabel}
28
26
  />
29
27
  <Box padding="0 0 0 58px">
30
28
  <Stack>
@@ -27,8 +27,7 @@ const TermsAndConditionsControlV2 = ({
27
27
  containerBackground = ATHENS_GREY,
28
28
  checkboxMargin = "4px 8px 4px 4px",
29
29
  modalTitle = "Terms and Conditions",
30
- initialFocusSelector = "",
31
- checkboxAriaLabel = ""
30
+ initialFocusSelector = ""
32
31
  }) => {
33
32
  const [showTerms, toggleShowTerms] = useState(false);
34
33
  const standardBoxShadow = generateShadows().standard.base;
@@ -59,7 +58,6 @@ const TermsAndConditionsControlV2 = ({
59
58
  onChange={onCheck}
60
59
  checkboxMargin={checkboxMargin}
61
60
  extraStyles={`align-self: flex-start;`}
62
- checkboxAriaLabel={checkboxAriaLabel}
63
61
  />
64
62
  )}
65
63
  <Stack childGap="0.25rem" fullHeight>