iter: d21 无障碍收尾(aria-label / role / aria-hidden)

This commit is contained in:
ui-arch-bot
2026-10-23 17:03:02 +08:00
parent 9cfdb43a4f
commit 00a6104f84
10 changed files with 24 additions and 10 deletions
+1 -1
View File
@@ -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;