Skip to content

Commit 21f9a11

Browse files
committed
feat: dd aria-* to Spin
1 parent 76573fc commit 21f9a11

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

components/spin/Spin.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,13 @@ export default defineComponent({
139139
};
140140

141141
const spinElement = (
142-
<div {...divProps} style={style} class={spinClassName}>
142+
<div
143+
{...divProps}
144+
style={style}
145+
class={spinClassName}
146+
aria-live="polite"
147+
aria-busy={sSpinning}
148+
>
143149
{this.renderIndicator(prefixCls)}
144150
{tip ? <div class={`${prefixCls}-text`}>{tip}</div> : null}
145151
</div>

components/spin/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ When part of the page is waiting for asynchronous data or during a rendering pro
1818
| delay | specifies a delay in milliseconds for loading state (prevent flush) | number (milliseconds) | - | |
1919
| indicator | vue node of the spinning indicator | vNode \|slot | - | |
2020
| size | size of Spin, options: `small`, `default` and `large` | string | `default` | |
21-
| spinning | whether Spin is spinning | boolean | true | |
21+
| spinning | whether Spin is visible | boolean | true | |
2222
| tip | customize description content when Spin has children | string \| slot | - | slot 3.0 |
2323
| wrapperClassName | className of wrapper when Spin has children | string | - | |
2424

components/spin/style/index.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
}
163163

164164
&-spin {
165-
transform: rotate(45deg);
165+
transform: rotate(0deg);
166166
animation: antRotate 1.2s infinite linear;
167167
}
168168
}
@@ -211,7 +211,7 @@
211211

212212
@keyframes antRotate {
213213
to {
214-
transform: rotate(405deg);
214+
transform: rotate(360deg);
215215
}
216216
}
217217

0 commit comments

Comments
 (0)