iter: d21 无障碍收尾(aria-label / role / aria-hidden)
This commit is contained in:
@@ -4,7 +4,7 @@ import type { SpinnerProps } from './types.js';
|
||||
/*** 加载指示器:纯 CSS 旋转动画,size 控制直径 ***/
|
||||
export function spinner(props: SpinnerProps = {}): HTMLElement {
|
||||
const size = `${props.size ?? 18}px`;
|
||||
const el = h('span', { class: 'ua-spinner' });
|
||||
const el = h('span', { class: 'ua-spinner', role: 'status', 'aria-label': '加载中' }); // 读屏播报加载状态
|
||||
el.style.width = size;
|
||||
el.style.height = size;
|
||||
return el;
|
||||
|
||||
Reference in New Issue
Block a user