@douyinfe/semi-ui 2.3.0-beta.0 → 2.3.0

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/empty/index.tsx CHANGED
@@ -108,7 +108,7 @@ export default class Empty extends BaseComponent<EmptyProps, EmptyState> {
108
108
  style: { fontWeight: 400 },
109
109
  };
110
110
  return (
111
- <div className={wrapperCls} style={style} aria-label="empty placeholder image">
111
+ <div className={wrapperCls} style={style}>
112
112
  <div className={`${prefixCls}-image`} style={imageStyle} >
113
113
  {imageNode}
114
114
  </div>
@@ -149,8 +149,7 @@ class AvatarGroup extends _react.PureComponent {
149
149
  }
150
150
 
151
151
  return /*#__PURE__*/_react.default.createElement("div", {
152
- className: groupCls,
153
- "aria-label": "avatar group"
152
+ className: groupCls
154
153
  }, inner);
155
154
  }
156
155
 
@@ -204,7 +204,6 @@ class Avatar extends _baseComponent.default {
204
204
  const hoverRender = hoverContent ? /*#__PURE__*/_react.default.createElement("div", {
205
205
  className: "".concat(prefixCls, "-hover")
206
206
  }, hoverContent) : null;
207
- let ariaLabel;
208
207
 
209
208
  if (isImg) {
210
209
  content = /*#__PURE__*/_react.default.createElement("img", (0, _assign.default)({
@@ -213,22 +212,18 @@ class Avatar extends _baseComponent.default {
213
212
  onError: this.handleError,
214
213
  alt: alt
215
214
  }, imgAttr));
216
- ariaLabel = 'avatar';
217
215
  } else if (typeof children === 'string') {
218
216
  content = /*#__PURE__*/_react.default.createElement("span", {
219
217
  className: "".concat(prefixCls, "-content")
220
218
  }, /*#__PURE__*/_react.default.createElement("span", {
221
219
  className: "".concat(prefixCls, "-label")
222
220
  }, children));
223
- ariaLabel = "avatar of ".concat(children);
224
221
  }
225
222
 
226
223
  return (
227
224
  /*#__PURE__*/
228
225
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
229
- _react.default.createElement("span", (0, _assign.default)({
230
- "aria-label": ariaLabel
231
- }, others, {
226
+ _react.default.createElement("span", (0, _assign.default)({}, others, {
232
227
  style: style,
233
228
  className: avatarCls,
234
229
  onClick: onClick,
@@ -126,8 +126,7 @@ class Collapse extends _baseComponent.default {
126
126
  } = this.state;
127
127
  return /*#__PURE__*/_react.default.createElement("div", {
128
128
  className: clsPrefix,
129
- style: style,
130
- "aria-label": "Collapse"
129
+ style: style
131
130
  }, /*#__PURE__*/_react.default.createElement(_collapseContext.default.Provider, {
132
131
  value: {
133
132
  activeSet,
@@ -91,9 +91,7 @@ class CollapsePanel extends _react.PureComponent {
91
91
  if (typeof header === 'string') {
92
92
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, iconPosLeft ? icon : null, /*#__PURE__*/_react.default.createElement("span", null, header), /*#__PURE__*/_react.default.createElement("span", {
93
93
  className: "".concat(_constants.cssClasses.PREFIX, "-header-right")
94
- }, /*#__PURE__*/_react.default.createElement("span", {
95
- "aria-label": 'Extra of collapse header'
96
- }, extra), iconPosLeft ? null : icon));
94
+ }, /*#__PURE__*/_react.default.createElement("span", null, extra), iconPosLeft ? null : icon));
97
95
  }
98
96
 
99
97
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, iconPosLeft ? icon : null, header, iconPosLeft ? null : icon);
@@ -128,7 +126,6 @@ class CollapsePanel extends _react.PureComponent {
128
126
  ["".concat(_constants.cssClasses.PREFIX, "-content")]: true
129
127
  });
130
128
  return /*#__PURE__*/_react.default.createElement("div", (0, _assign.default)({
131
- "aria-label": 'Collapse panel',
132
129
  className: itemCls
133
130
  }, restProps), /*#__PURE__*/_react.default.createElement("div", {
134
131
  role: "button",
@@ -144,7 +141,6 @@ class CollapsePanel extends _react.PureComponent {
144
141
  reCalcKey: reCalcKey
145
142
  }, /*#__PURE__*/_react.default.createElement("div", {
146
143
  className: contentCls,
147
- "aria-label": 'Collapse content',
148
144
  "aria-hidden": !active,
149
145
  id: this.ariaID
150
146
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -119,8 +119,7 @@ class Empty extends _baseComponent.default {
119
119
  };
120
120
  return /*#__PURE__*/_react.default.createElement("div", {
121
121
  className: wrapperCls,
122
- style: style,
123
- "aria-label": "empty placeholder image"
122
+ style: style
124
123
  }, /*#__PURE__*/_react.default.createElement("div", {
125
124
  className: "".concat(prefixCls, "-image"),
126
125
  style: imageStyle
@@ -102,8 +102,7 @@ class SideSheetContent extends _react.default.PureComponent {
102
102
 
103
103
  if (title) {
104
104
  header = /*#__PURE__*/_react.default.createElement("div", {
105
- className: "".concat(prefixCls, "-title"),
106
- "aria-label": 'Sidesheet title'
105
+ className: "".concat(prefixCls, "-title")
107
106
  }, this.props.title);
108
107
  }
109
108
 
@@ -122,6 +121,7 @@ class SideSheetContent extends _react.default.PureComponent {
122
121
  return /*#__PURE__*/_react.default.createElement("div", {
123
122
  className: "".concat(prefixCls, "-header"),
124
123
  role: 'heading',
124
+ "aria-level": 1,
125
125
  style: (0, _assign.default)({}, headerStyle)
126
126
  }, header, closer);
127
127
  }
@@ -155,15 +155,12 @@ class SideSheetContent extends _react.default.PureComponent {
155
155
  // onMouseDown={this.onDialogMouseDown}
156
156
  style: (0, _assign.default)((0, _assign.default)({}, props.style), style)
157
157
  }, /*#__PURE__*/_react.default.createElement("div", {
158
- className: "".concat(prefixCls, "-content"),
159
- "aria-label": "Sidesheet content"
158
+ className: "".concat(prefixCls, "-content")
160
159
  }, header, /*#__PURE__*/_react.default.createElement("div", {
161
160
  className: "".concat(prefixCls, "-body"),
162
- "aria-label": "Sidesheet body",
163
161
  style: props.bodyStyle
164
162
  }, props.children), props.footer ? /*#__PURE__*/_react.default.createElement("div", {
165
- className: "".concat(prefixCls, "-footer"),
166
- "aria-label": "Sidesheet footer"
163
+ className: "".concat(prefixCls, "-footer")
167
164
  }, props.footer) : null));
168
165
 
169
166
  return dialogElement;
@@ -186,8 +183,7 @@ class SideSheetContent extends _react.default.PureComponent {
186
183
 
187
184
  return /*#__PURE__*/_react.default.createElement("div", {
188
185
  className: wrapperCls,
189
- style: wrapperStyle,
190
- "aria-label": this.props['aria-label']
186
+ style: wrapperStyle
191
187
  }, this.getMaskElement(), this.getDialogElement());
192
188
  }
193
189
 
@@ -59,7 +59,8 @@ function Icon() {
59
59
  viewBox: "0 0 36 36",
60
60
  version: "1.1",
61
61
  xmlns: "http://www.w3.org/2000/svg",
62
- "aria-label": "spin"
62
+ "aria-hidden": true,
63
+ "data-icon": "spin"
63
64
  }), /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
64
65
  x1: "0%",
65
66
  y1: "100%",
@@ -308,7 +308,7 @@ class Tooltip extends _baseComponent.default {
308
308
  placement: props.position || 'top',
309
309
  transitionStyle: {},
310
310
  isPositionUpdated: false,
311
- id: (0, _uuid.getUuidv4)() // auto generate id, will be used by children.aria-descriptionby & content.id, improve a11y
311
+ id: (0, _uuid.getUuidShort)() // auto generate id, will be used by children.aria-describedby & content.id, improve a11y
312
312
 
313
313
  };
314
314
  this.foundation = new _foundation.default(this.adapter);
@@ -259,12 +259,12 @@ class FileCard extends _react.PureComponent {
259
259
  orbitStroke: '#FFF',
260
260
  "aria-label": "uploading file progress"
261
261
  }) : null, showRetry ? retry : null, showReplace && replace, showPicInfo && picInfo, !disabled && /*#__PURE__*/_react.default.createElement("div", {
262
- className: closeCls
262
+ className: closeCls,
263
+ onClick: e => this.onRemove(e)
263
264
  }, /*#__PURE__*/_react.default.createElement(_semiIcons.IconClose, {
264
265
  tabIndex: 0,
265
266
  role: "button",
266
- size: "extra-small",
267
- onClick: e => this.onRemove(e)
267
+ size: "extra-small"
268
268
  })), this.renderPicValidateMsg());
269
269
  }
270
270
 
@@ -115,8 +115,7 @@ export default class AvatarGroup extends PureComponent {
115
115
  }
116
116
 
117
117
  return /*#__PURE__*/React.createElement("div", {
118
- className: groupCls,
119
- "aria-label": "avatar group"
118
+ className: groupCls
120
119
  }, inner);
121
120
  }
122
121
 
@@ -158,7 +158,6 @@ export default class Avatar extends BaseComponent {
158
158
  const hoverRender = hoverContent ? /*#__PURE__*/React.createElement("div", {
159
159
  className: "".concat(prefixCls, "-hover")
160
160
  }, hoverContent) : null;
161
- let ariaLabel;
162
161
 
163
162
  if (isImg) {
164
163
  content = /*#__PURE__*/React.createElement("img", _Object$assign({
@@ -167,22 +166,18 @@ export default class Avatar extends BaseComponent {
167
166
  onError: this.handleError,
168
167
  alt: alt
169
168
  }, imgAttr));
170
- ariaLabel = 'avatar';
171
169
  } else if (typeof children === 'string') {
172
170
  content = /*#__PURE__*/React.createElement("span", {
173
171
  className: "".concat(prefixCls, "-content")
174
172
  }, /*#__PURE__*/React.createElement("span", {
175
173
  className: "".concat(prefixCls, "-label")
176
174
  }, children));
177
- ariaLabel = "avatar of ".concat(children);
178
175
  }
179
176
 
180
177
  return (
181
178
  /*#__PURE__*/
182
179
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
183
- React.createElement("span", _Object$assign({
184
- "aria-label": ariaLabel
185
- }, others, {
180
+ React.createElement("span", _Object$assign({}, others, {
186
181
  style: style,
187
182
  className: avatarCls,
188
183
  onClick: onClick,
@@ -99,8 +99,7 @@ class Collapse extends BaseComponent {
99
99
  } = this.state;
100
100
  return /*#__PURE__*/React.createElement("div", {
101
101
  className: clsPrefix,
102
- style: style,
103
- "aria-label": "Collapse"
102
+ style: style
104
103
  }, /*#__PURE__*/React.createElement(CollapseContext.Provider, {
105
104
  value: {
106
105
  activeSet,
@@ -60,9 +60,7 @@ export default class CollapsePanel extends PureComponent {
60
60
  if (typeof header === 'string') {
61
61
  return /*#__PURE__*/React.createElement(React.Fragment, null, iconPosLeft ? icon : null, /*#__PURE__*/React.createElement("span", null, header), /*#__PURE__*/React.createElement("span", {
62
62
  className: "".concat(cssClasses.PREFIX, "-header-right")
63
- }, /*#__PURE__*/React.createElement("span", {
64
- "aria-label": 'Extra of collapse header'
65
- }, extra), iconPosLeft ? null : icon));
63
+ }, /*#__PURE__*/React.createElement("span", null, extra), iconPosLeft ? null : icon));
66
64
  }
67
65
 
68
66
  return /*#__PURE__*/React.createElement(React.Fragment, null, iconPosLeft ? icon : null, header, iconPosLeft ? null : icon);
@@ -97,7 +95,6 @@ export default class CollapsePanel extends PureComponent {
97
95
  ["".concat(cssClasses.PREFIX, "-content")]: true
98
96
  });
99
97
  return /*#__PURE__*/React.createElement("div", _Object$assign({
100
- "aria-label": 'Collapse panel',
101
98
  className: itemCls
102
99
  }, restProps), /*#__PURE__*/React.createElement("div", {
103
100
  role: "button",
@@ -113,7 +110,6 @@ export default class CollapsePanel extends PureComponent {
113
110
  reCalcKey: reCalcKey
114
111
  }, /*#__PURE__*/React.createElement("div", {
115
112
  className: contentCls,
116
- "aria-label": 'Collapse content',
117
113
  "aria-hidden": !active,
118
114
  id: this.ariaID
119
115
  }, /*#__PURE__*/React.createElement("div", {
@@ -98,8 +98,7 @@ export default class Empty extends BaseComponent {
98
98
  };
99
99
  return /*#__PURE__*/React.createElement("div", {
100
100
  className: wrapperCls,
101
- style: style,
102
- "aria-label": "empty placeholder image"
101
+ style: style
103
102
  }, /*#__PURE__*/React.createElement("div", {
104
103
  className: "".concat(prefixCls, "-image"),
105
104
  style: imageStyle
@@ -79,8 +79,7 @@ export default class SideSheetContent extends React.PureComponent {
79
79
 
80
80
  if (title) {
81
81
  header = /*#__PURE__*/React.createElement("div", {
82
- className: "".concat(prefixCls, "-title"),
83
- "aria-label": 'Sidesheet title'
82
+ className: "".concat(prefixCls, "-title")
84
83
  }, this.props.title);
85
84
  }
86
85
 
@@ -99,6 +98,7 @@ export default class SideSheetContent extends React.PureComponent {
99
98
  return /*#__PURE__*/React.createElement("div", {
100
99
  className: "".concat(prefixCls, "-header"),
101
100
  role: 'heading',
101
+ "aria-level": 1,
102
102
  style: _Object$assign({}, headerStyle)
103
103
  }, header, closer);
104
104
  }
@@ -131,15 +131,12 @@ export default class SideSheetContent extends React.PureComponent {
131
131
  // onMouseDown={this.onDialogMouseDown}
132
132
  style: _Object$assign(_Object$assign({}, props.style), style)
133
133
  }, /*#__PURE__*/React.createElement("div", {
134
- className: "".concat(prefixCls, "-content"),
135
- "aria-label": "Sidesheet content"
134
+ className: "".concat(prefixCls, "-content")
136
135
  }, header, /*#__PURE__*/React.createElement("div", {
137
136
  className: "".concat(prefixCls, "-body"),
138
- "aria-label": "Sidesheet body",
139
137
  style: props.bodyStyle
140
138
  }, props.children), props.footer ? /*#__PURE__*/React.createElement("div", {
141
- className: "".concat(prefixCls, "-footer"),
142
- "aria-label": "Sidesheet footer"
139
+ className: "".concat(prefixCls, "-footer")
143
140
  }, props.footer) : null));
144
141
  return dialogElement;
145
142
  }
@@ -161,8 +158,7 @@ export default class SideSheetContent extends React.PureComponent {
161
158
 
162
159
  return /*#__PURE__*/React.createElement("div", {
163
160
  className: wrapperCls,
164
- style: wrapperStyle,
165
- "aria-label": this.props['aria-label']
161
+ style: wrapperStyle
166
162
  }, this.getMaskElement(), this.getDialogElement());
167
163
  }
168
164
 
@@ -44,7 +44,8 @@ function Icon() {
44
44
  viewBox: "0 0 36 36",
45
45
  version: "1.1",
46
46
  xmlns: "http://www.w3.org/2000/svg",
47
- "aria-label": "spin"
47
+ "aria-hidden": true,
48
+ "data-icon": "spin"
48
49
  }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
49
50
  x1: "0%",
50
51
  y1: "100%",
@@ -33,7 +33,7 @@ import Event from '@douyinfe/semi-foundation/lib/es/utils/Event';
33
33
  import { convertDOMRectToObject } from '@douyinfe/semi-foundation/lib/es/utils/dom';
34
34
  import TooltipFoundation from '@douyinfe/semi-foundation/lib/es/tooltip/foundation';
35
35
  import { strings, cssClasses, numbers } from '@douyinfe/semi-foundation/lib/es/tooltip/constants';
36
- import { getUuidv4 } from '@douyinfe/semi-foundation/lib/es/utils/uuid';
36
+ import { getUuidShort } from '@douyinfe/semi-foundation/lib/es/utils/uuid';
37
37
  import '@douyinfe/semi-foundation/lib/es/tooltip/tooltip.css';
38
38
  import BaseComponent from '../_base/baseComponent';
39
39
  import { isHTMLElement } from '../_base/reactUtils';
@@ -268,7 +268,7 @@ export default class Tooltip extends BaseComponent {
268
268
  placement: props.position || 'top',
269
269
  transitionStyle: {},
270
270
  isPositionUpdated: false,
271
- id: getUuidv4() // auto generate id, will be used by children.aria-descriptionby & content.id, improve a11y
271
+ id: getUuidShort() // auto generate id, will be used by children.aria-describedby & content.id, improve a11y
272
272
 
273
273
  };
274
274
  this.foundation = new TooltipFoundation(this.adapter);
@@ -223,12 +223,12 @@ class FileCard extends PureComponent {
223
223
  orbitStroke: '#FFF',
224
224
  "aria-label": "uploading file progress"
225
225
  }) : null, showRetry ? retry : null, showReplace && replace, showPicInfo && picInfo, !disabled && /*#__PURE__*/React.createElement("div", {
226
- className: closeCls
226
+ className: closeCls,
227
+ onClick: e => this.onRemove(e)
227
228
  }, /*#__PURE__*/React.createElement(IconClose, {
228
229
  tabIndex: 0,
229
230
  role: "button",
230
- size: "extra-small",
231
- onClick: e => this.onRemove(e)
231
+ size: "extra-small"
232
232
  })), this.renderPicValidateMsg());
233
233
  }
234
234
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.3.0-beta.0",
3
+ "version": "2.3.0",
4
4
  "description": "",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es/index.js",
@@ -14,11 +14,11 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@babel/runtime-corejs3": "^7.15.4",
17
- "@douyinfe/semi-animation-react": "2.3.0-beta.0",
18
- "@douyinfe/semi-foundation": "2.3.0-beta.0",
19
- "@douyinfe/semi-icons": "2.3.0-beta.0",
20
- "@douyinfe/semi-illustrations": "2.3.0-beta.0",
21
- "@douyinfe/semi-theme-default": "2.3.0-beta.0",
17
+ "@douyinfe/semi-animation-react": "2.3.0",
18
+ "@douyinfe/semi-foundation": "2.3.0",
19
+ "@douyinfe/semi-icons": "2.3.0",
20
+ "@douyinfe/semi-illustrations": "2.3.0",
21
+ "@douyinfe/semi-theme-default": "2.3.0",
22
22
  "@types/react-window": "^1.8.2",
23
23
  "async-validator": "^3.5.0",
24
24
  "classnames": "^2.2.6",
@@ -68,13 +68,13 @@
68
68
  ],
69
69
  "author": "",
70
70
  "license": "MIT",
71
- "gitHead": "5847f92fd90bc37f1fed5c7d2d6d64f6ebf632bc",
71
+ "gitHead": "456b90e3f3501dd92e9d0b55bb9c8c86312837aa",
72
72
  "devDependencies": {
73
73
  "@babel/plugin-proposal-decorators": "^7.15.8",
74
74
  "@babel/plugin-transform-runtime": "^7.15.8",
75
75
  "@babel/preset-env": "^7.15.8",
76
76
  "@babel/preset-react": "^7.14.5",
77
- "@douyinfe/semi-scss-compile": "2.3.0-beta.0",
77
+ "@douyinfe/semi-scss-compile": "2.3.0",
78
78
  "@storybook/addon-knobs": "^6.3.1",
79
79
  "@types/lodash": "^4.14.176",
80
80
  "babel-loader": "^8.2.2",
@@ -87,7 +87,7 @@ export default class SideSheetContent extends React.PureComponent<SideSheetConte
87
87
  let header, closer;
88
88
  if (title) {
89
89
  header = (
90
- <div className={`${prefixCls}-title`} aria-label={'Sidesheet title'}>
90
+ <div className={`${prefixCls}-title`}>
91
91
  {this.props.title}
92
92
  </div>
93
93
  );
@@ -106,7 +106,7 @@ export default class SideSheetContent extends React.PureComponent<SideSheetConte
106
106
  );
107
107
  }
108
108
  return (
109
- <div className={`${prefixCls}-header`} role={'heading'} style={{ ...headerStyle }}>
109
+ <div className={`${prefixCls}-header`} role={'heading'} aria-level={1} style={{ ...headerStyle }}>
110
110
  {header}
111
111
  {closer}
112
112
  </div>
@@ -137,13 +137,13 @@ export default class SideSheetContent extends React.PureComponent<SideSheetConte
137
137
  style={{ ...props.style, ...style }}
138
138
  // id={this.dialogId}
139
139
  >
140
- <div className={`${prefixCls}-content`} aria-label={`Sidesheet content`}>
140
+ <div className={`${prefixCls}-content`}>
141
141
  {header}
142
- <div className={`${prefixCls}-body`} aria-label={`Sidesheet body`} style={props.bodyStyle}>
142
+ <div className={`${prefixCls}-body`} style={props.bodyStyle}>
143
143
  {props.children}
144
144
  </div>
145
145
  {props.footer ? (
146
- <div className={`${prefixCls}-footer`} aria-label={`Sidesheet footer`}>
146
+ <div className={`${prefixCls}-footer`}>
147
147
  {props.footer}
148
148
  </div>
149
149
  ) : null}
@@ -167,9 +167,7 @@ export default class SideSheetContent extends React.PureComponent<SideSheetConte
167
167
  wrapperStyle.width = width;
168
168
  }
169
169
  return (
170
- <div className={wrapperCls}
171
- style={wrapperStyle}
172
- aria-label={this.props['aria-label']}>
170
+ <div className={wrapperCls} style={wrapperStyle}>
173
171
  {this.getMaskElement()}
174
172
  {this.getDialogElement()}
175
173
  </div>
package/spin/icon.tsx CHANGED
@@ -29,7 +29,8 @@ function Icon(props: IconProps = {}) {
29
29
  viewBox="0 0 36 36"
30
30
  version="1.1"
31
31
  xmlns="http://www.w3.org/2000/svg"
32
- aria-label="spin"
32
+ aria-hidden
33
+ data-icon="spin"
33
34
  >
34
35
  <defs>
35
36
  <linearGradient x1="0%" y1="100%" x2="100%" y2="100%" id={id}>
package/tooltip/index.tsx CHANGED
@@ -12,7 +12,7 @@ import { ArrayElement } from '@douyinfe/semi-foundation/utils/type';
12
12
  import { convertDOMRectToObject, DOMRectLikeType } from '@douyinfe/semi-foundation/utils/dom';
13
13
  import TooltipFoundation, { TooltipAdapter, Position, PopupContainerDOMRect } from '@douyinfe/semi-foundation/tooltip/foundation';
14
14
  import { strings, cssClasses, numbers } from '@douyinfe/semi-foundation/tooltip/constants';
15
- import { getUuidv4 } from '@douyinfe/semi-foundation/utils/uuid';
15
+ import { getUuidShort } from '@douyinfe/semi-foundation/utils/uuid';
16
16
  import '@douyinfe/semi-foundation/tooltip/tooltip.scss';
17
17
 
18
18
  import BaseComponent, { BaseProps } from '../_base/baseComponent';
@@ -174,7 +174,7 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
174
174
  placement: props.position || 'top',
175
175
  transitionStyle: {},
176
176
  isPositionUpdated: false,
177
- id: getUuidv4(), // auto generate id, will be used by children.aria-descriptionby & content.id, improve a11y
177
+ id: getUuidShort(), // auto generate id, will be used by children.aria-describedby & content.id, improve a11y
178
178
  };
179
179
  this.foundation = new TooltipFoundation(this.adapter);
180
180
  this.eventManager = new Event();
@@ -540,6 +540,7 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
540
540
 
541
541
  return (
542
542
  <Portal getPopupContainer={this.props.getPopupContainer} style={{ zIndex }}>
543
+ {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
543
544
  <div
544
545
  className={`${BASE_CLASS_PREFIX}-portal-inner`}
545
546
  style={portalInnerStyle}
@@ -163,8 +163,8 @@ class FileCard extends PureComponent<FileCardProps> {
163
163
  {showReplace && replace}
164
164
  {showPicInfo && picInfo}
165
165
  {!disabled && (
166
- <div className={closeCls}>
167
- <IconClose tabIndex={0} role="button" size="extra-small" onClick={e => this.onRemove(e)} />
166
+ <div className={closeCls} onClick={e => this.onRemove(e)}>
167
+ <IconClose tabIndex={0} role="button" size="extra-small" />
168
168
  </div>
169
169
  )}
170
170
  {this.renderPicValidateMsg()}