``` ### 常用 ARIA 屬性 | 場景 | ARIA | |------|------| | Sidebar 當前頁 | `aria-current="page"` | | Tab 群組 | `role="tablist"` / `role="tab"` / `aria-selected` / `aria-controls` | | Modal 開啟時 | `role="dialog"` / `aria-modal="true"` / `aria-labelledby` | | Loading 按鈕 | `aria-busy="true"` / `aria-label="載入中"` | | 禁用按鈕 | `aria-disabled="true"`(不用 `disabled` 屬性以保留可聚焦性) | | Toast | `role="status"`(success/info)/ `role="alert"`(error) | | Dropdown | `aria-haspopup="menu"` / `aria-expanded` | | Mock badge | `role="status"` / `aria-label="目前為 Mock 模式"` | ### 動態內容 Live regions 用 `aria-live`: | 場景 | `aria-live` | |------|------------| | Server 狀態變化 | `polite` | | 推論結果更新 | `off`(太頻繁會吵) | | 錯誤訊息 | `assertive` | | Toast success | `polite` | ## 9.5 圖片與圖示 | 類型 | 標註 | |------|------| | 裝飾性圖示 | `aria-hidden="true"` | | 功能性圖示(icon only button) | `aria-label="動作描述"` | | 資訊性圖片(logo、插圖) | `alt="..."` | | 影片 feed(攝影機串流) | `aria-label="即時攝影機畫面"`(無法提供動態描述) | | 推論結果 overlay(bounding box) | 獨立顯示為清單,不只靠視覺(見 9.8) | ## 9.6 表單 - 所有 input 必須有對應的 `