@box/blueprint-web 7.0.2 → 7.1.1

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.
@@ -29,6 +29,7 @@ const TextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
29
29
  } = props;
30
30
  const inputRef = useRef(null);
31
31
  const inputId = useUniqueId('input-');
32
+ const inlineErrorId = useUniqueId('inline-error-');
32
33
  const focusInput = useCallback(() => {
33
34
  inputRef.current?.focus();
34
35
  }, []);
@@ -50,6 +51,9 @@ const TextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
50
51
  }) : label
51
52
  }), jsx("input", {
52
53
  ...rest,
54
+ ...(hasError && {
55
+ 'aria-describedby': inlineErrorId
56
+ }),
53
57
  ref: useForkRef(inputRef, forwardedRef),
54
58
  "aria-invalid": hasError,
55
59
  "aria-required": required,
@@ -68,6 +72,7 @@ const TextInput = /*#__PURE__*/forwardRef((props, forwardedRef) => {
68
72
  })]
69
73
  }), jsx(InlineError, {
70
74
  className: styles.inlineError,
75
+ id: inlineErrorId,
71
76
  children: error
72
77
  })]
73
78
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "7.0.2",
3
+ "version": "7.1.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -58,7 +58,7 @@
58
58
  "@box/storybook-utils": "^0.1.0",
59
59
  "react-stately": "^3.31.1"
60
60
  },
61
- "gitHead": "837a2ca592b22bd440c03b6040aa9bd2009d0bdd",
61
+ "gitHead": "bd812a57eb43d2b270bb8c6281fb1eaec038c76e",
62
62
  "module": "lib-esm/index.js",
63
63
  "main": "lib-esm/index.js",
64
64
  "exports": {