@thecb/components 8.4.11-beta.10 → 8.4.11-beta.11

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.10",
3
+ "version": "8.4.11-beta.11",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -126,7 +126,7 @@ const Checkbox = ({
126
126
  onChange={onChange}
127
127
  tabIndex="-1"
128
128
  aria-invalid={error}
129
- aria-describedby={name}
129
+ aria-describedby={error ? `${name}-error-message` : ""}
130
130
  />
131
131
  <StyledCheckbox
132
132
  error={error}
@@ -288,9 +288,9 @@ const Dropdown = ({
288
288
  as="input"
289
289
  aria-multiline="false"
290
290
  aria-autocomplete="list"
291
- // aria-activedescendant="focused_option"
292
- // aria-owns={`${ariaLabelledby}_listbox`}
293
- // aria-controls={`${ariaLabelledby}_listbox`}
291
+ aria-activedescendant="focused_option"
292
+ aria-owns={`${ariaLabelledby}_listbox`}
293
+ aria-controls={`${ariaLabelledby}_listbox`}
294
294
  aria-haspopup="listbox"
295
295
  aria-labelledby={ariaLabelledby}
296
296
  aria-describedby={ariaDescribedby}
@@ -315,7 +315,7 @@ const Dropdown = ({
315
315
  minHeight="48px"
316
316
  minWidth="100%"
317
317
  name={autocompleteValue}
318
- // aria-expanded={isOpen}
318
+ aria-expanded={isOpen}
319
319
  onChange={e => {
320
320
  // support autofill and copy/paste
321
321
  if (e.target.value !== inputValue) {
@@ -326,6 +326,7 @@ const Dropdown = ({
326
326
  padding="12px"
327
327
  placeholder={getSelection()}
328
328
  themeValues={themeValues}
329
+ role="combobox"
329
330
  title={hasTitles ? getSelection() : null}
330
331
  type="text"
331
332
  tabIndex={0}
@@ -390,14 +391,14 @@ const Dropdown = ({
390
391
  : MINESHAFT_GREY
391
392
  }
392
393
  extraStyles={`padding-left: 16px;
393
- cursor: ${
394
- disabledValues.includes(choice.value)
395
- ? "default"
396
- : "pointer"
397
- };
398
- white-space: nowrap;
399
- overflow: hidden;
400
- text-overflow: ellipsis;`}
394
+ cursor: ${
395
+ disabledValues.includes(choice.value)
396
+ ? "default"
397
+ : "pointer"
398
+ };
399
+ white-space: nowrap;
400
+ overflow: hidden;
401
+ text-overflow: ellipsis;`}
401
402
  >
402
403
  {choice.text}
403
404
  </Text>