@thecb/components 8.4.11-beta.17 → 8.4.11-beta.19

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": "8.4.11-beta.17",
3
+ "version": "8.4.11-beta.19",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -93,6 +93,7 @@ const Alert = ({
93
93
  boxShadow={enableBoxShadow ? generateShadows()?.inset?.base : ""}
94
94
  extraStyles={extraStyles}
95
95
  role="alert"
96
+ aria-atomic={true}
96
97
  >
97
98
  {maxContentWidth ? (
98
99
  <Center maxWidth={maxContentWidth}>{content}</Center>
@@ -125,8 +125,6 @@ const Checkbox = ({
125
125
  checked={checked}
126
126
  onChange={onChange}
127
127
  tabIndex="-1"
128
- aria-invalid={error}
129
- aria-describedby={error ? `${name}-error-message` : ""}
130
128
  />
131
129
  <StyledCheckbox
132
130
  error={error}
@@ -26,7 +26,6 @@ const story = page({
26
26
  const CountryFormWrapper = ({ fields, actions }) => (
27
27
  <Box minHeight="300px">
28
28
  <CountryDropdown
29
- aria-label="Country"
30
29
  labelTextWhenNoError="Country"
31
30
  errorMessages={errorMessages}
32
31
  options={options}
@@ -286,15 +286,15 @@ const Dropdown = ({
286
286
  >
287
287
  <Box
288
288
  as="input"
289
- role="combobox"
290
289
  aria-multiline="false"
290
+ autoComplete={autocompleteValue}
291
+ aria-controls={`${ariaLabelledby}_listbox`}
291
292
  aria-activedescendant="focused_option"
292
293
  aria-owns={`${ariaLabelledby}_listbox`}
293
- aria-controls={`${ariaLabelledby}_listbox`}
294
294
  aria-haspopup="listbox"
295
295
  aria-labelledby={ariaLabelledby}
296
296
  aria-describedby={ariaDescribedby}
297
- autoComplete={autocompleteValue}
297
+ aria-expanded={isOpen}
298
298
  background={isOpen ? themeValues.hoverColor : WHITE}
299
299
  borderRadius="2px"
300
300
  borderSize="1px"
@@ -315,7 +315,6 @@ const Dropdown = ({
315
315
  minHeight="48px"
316
316
  minWidth="100%"
317
317
  name={autocompleteValue}
318
- aria-expanded={isOpen}
319
318
  onChange={e => {
320
319
  // support autofill and copy/paste
321
320
  if (e.target.value !== inputValue) {
@@ -325,6 +324,7 @@ const Dropdown = ({
325
324
  }}
326
325
  padding="12px"
327
326
  placeholder={getSelection()}
327
+ role="combobox"
328
328
  themeValues={themeValues}
329
329
  title={hasTitles ? getSelection() : null}
330
330
  type="text"
@@ -220,15 +220,16 @@ const FormInput = ({
220
220
  themeValues={themeValues}
221
221
  $customHeight={customHeight}
222
222
  $extraStyles={extraStyles}
223
- autocomplete={autocomplete}
223
+ autoComplete={autocomplete}
224
224
  {...props}
225
225
  />
226
226
  ) : (
227
227
  <InputField
228
228
  aria-labelledby={createIdFromString(labelTextWhenNoError)}
229
- aria-describedby={`${createIdFromString(
230
- labelTextWhenNoError
231
- )}-error-message`}
229
+ aria-describedby={createIdFromString(
230
+ labelTextWhenNoError,
231
+ "error message"
232
+ )}
232
233
  aria-invalid={
233
234
  (field.dirty && field.hasErrors) ||
234
235
  (field.hasErrors && showErrors)
@@ -240,7 +241,7 @@ const FormInput = ({
240
241
  inputMode={isNum ? "numeric" : isEmail ? "email" : "text"}
241
242
  field={field}
242
243
  showErrors={showErrors}
243
- data-qa={labelTextWhenNoError}
244
+ data-qa={createIdFromString(labelTextWhenNoError)}
244
245
  themeValues={themeValues}
245
246
  background={background}
246
247
  $customHeight={customHeight}
@@ -66,9 +66,10 @@ const FormSelect = ({
66
66
  </Box>
67
67
  <Dropdown
68
68
  ariaLabelledby={createIdFromString(labelTextWhenNoError)}
69
- ariaDescribedby={`${createIdFromString(
70
- labelTextWhenNoError
71
- )}-error-message`}
69
+ aria-describedby={createIdFromString(
70
+ labelTextWhenNoError,
71
+ "error message"
72
+ )}
72
73
  maxHeight={dropdownMaxHeight}
73
74
  hasTitles={hasTitles}
74
75
  placeholder={options[0] ? options[0].text : ""}
@@ -91,8 +92,6 @@ const FormSelect = ({
91
92
  autocompleteValue={autocompleteValue}
92
93
  smoothScroll={smoothScroll}
93
94
  required={options.required}
94
- aria-required={options.required}
95
- id={`${createIdFromString(labelTextWhenNoError)}-input`}
96
95
  />
97
96
  <Stack direction="row" justify="space-between">
98
97
  <Text
@@ -50,6 +50,7 @@ const AccountAndRoutingModal = ({
50
50
  }}
51
51
  >
52
52
  <Text
53
+ role="button"
53
54
  variant="pS"
54
55
  onClick={() => toggleOpen(true)}
55
56
  onKeyPress={e => e.key === "Enter" && toggleOpen(true)}
@@ -177,7 +177,7 @@ const PaymentFormCard = ({
177
177
  fieldActions={actions.fields.zipCode}
178
178
  showErrors={showErrors}
179
179
  onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
180
- autocomplete="billing postal-code"
180
+ autoComplete="billing postal-code"
181
181
  />
182
182
  </Box>
183
183
  )}