td-stylekit 28.4.0 → 28.5.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [28.5.1](https://github.com/treasure-data/td-stylekit/compare/v28.5.0...v28.5.1) (2022-11-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **CON-10462:** Migrate DetailPanel tests ([#1356](https://github.com/treasure-data/td-stylekit/issues/1356)) ([64dd981](https://github.com/treasure-data/td-stylekit/commit/64dd981))
7
+
8
+ # [28.5.0](https://github.com/treasure-data/td-stylekit/compare/v28.4.0...v28.5.0) (2022-10-14)
9
+
10
+
11
+ ### Features
12
+
13
+ * **CON-10759:** Increase accessibility of FormControl validation errors ([#1348](https://github.com/treasure-data/td-stylekit/issues/1348)) ([4c7c734](https://github.com/treasure-data/td-stylekit/commit/4c7c734))
14
+
1
15
  # [28.4.0](https://github.com/treasure-data/td-stylekit/compare/v28.3.0...v28.4.0) (2022-10-12)
2
16
 
3
17
 
@@ -162,6 +162,7 @@ var FormControl = /*#__PURE__*/function (_PureComponent) {
162
162
  var input = (0, _jsxRuntime.jsx)(InputComponent, _objectSpread({
163
163
  "data-gs-c": gsC(name, value),
164
164
  "data-gs": gs("src", "formcontrol", "formcontrol.tsx", "input-component"),
165
+ "aria-describedby": "".concat(name, "-validationError"),
165
166
  id: id || name,
166
167
  inputId: name,
167
168
  invalid: isInvalid,
@@ -195,6 +196,7 @@ var FormControl = /*#__PURE__*/function (_PureComponent) {
195
196
  });
196
197
  var errorAddon = (0, _jsxRuntime.jsx)(_FormFieldAddon["default"], {
197
198
  "data-gs": gs("src", "formcontrol", "formcontrol.tsx", "form-field-addon"),
199
+ id: "".concat(name, "-validationError"),
198
200
  className: addOnClassName,
199
201
  showFullError: showFullError,
200
202
  errorList: errorList,
@@ -26,6 +26,7 @@ declare type FormFieldInfoProps = {
26
26
  };
27
27
  export declare const FormFieldInfo: React.FunctionComponent<FormFieldInfoProps>;
28
28
  declare type FormFieldErrorProps = {
29
+ id?: string;
29
30
  className?: string;
30
31
  showFullError?: boolean;
31
32
  errorList: Array<string>;
@@ -122,6 +122,7 @@ var FormFieldError = function FormFieldError(_ref4) {
122
122
  return (0, _jsxRuntime.jsx)(_FormFieldAddonElements.AddonError, _objectSpread(_objectSpread({
123
123
  "data-gs-c": gsC(errorText, title),
124
124
  "data-gs": gs("src", "formfieldaddon", "formfieldaddon.tsx", "addon-error"),
125
+ role: "alert",
125
126
  className: className,
126
127
  errorList: errorList,
127
128
  title: title
@@ -133,7 +134,8 @@ var FormFieldError = function FormFieldError(_ref4) {
133
134
  exports.FormFieldError = FormFieldError;
134
135
 
135
136
  var FormFieldAddon = function FormFieldAddon(_ref5) {
136
- var className = _ref5.className,
137
+ var id = _ref5.id,
138
+ className = _ref5.className,
137
139
  showFullError = _ref5.showFullError,
138
140
  showFullHint = _ref5.showFullHint,
139
141
  showFullInfo = _ref5.showFullInfo,
@@ -151,6 +153,7 @@ var FormFieldAddon = function FormFieldAddon(_ref5) {
151
153
  if (errorList && errorList.length) {
152
154
  return (0, _jsxRuntime.jsx)(FormFieldError, {
153
155
  "data-gs": gs("src", "formfieldaddon", "formfieldaddon.tsx", "form-field-error"),
156
+ id: id,
154
157
  className: className,
155
158
  showFullError: showFullError,
156
159
  errorList: errorList,
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare type FormFieldAddonProps = {
3
+ id?: string;
3
4
  className?: string;
4
5
  showFullError?: boolean;
5
6
  showFullHint?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "td-stylekit",
3
- "version": "28.4.0",
3
+ "version": "28.5.1",
4
4
  "main": "dist/es/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",