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
@@ -17,7 +17,7 @@ export function modal(props: ModalProps, ...children: unknown[]): HTMLElement {
const box = h(
'div',
{ class: `ua-modal ua-modal-${props.size ?? 'md'}` },
h('div', { class: 'ua-modal-head' }, h('h3', { class: 'ua-modal-title' }, props.title), h('button', { class: 'ua-modal-close', onClick: close }, '×')),
h('div', { class: 'ua-modal-head' }, h('h3', { class: 'ua-modal-title' }, props.title), h('button', { type: 'button', class: 'ua-modal-close', 'aria-label': '关闭弹窗', onClick: close }, '×')),
h('div', { class: 'ua-modal-body' }, ...children),
props.footer ? h('div', { class: 'ua-modal-foot' }, props.footer) : null, // 底部操作区:右对齐,仅传了才渲染
);