Starter · code-edit

明確狀態轉移、aria-busy 與錯誤焦點

先看見缺口,再完成一個小修改。

Starter 要做什麼

先看見缺口,再完成一個小修改。

本主題檔案:files/index.html

定位:先記錄 state sequence,再分別核對由 state 推導的 DOM 屬性。

本階段驗收

頁面不會替你修改檔案;請在實作檔完成後重新整理確認。

目前要處理

state=idle、按鈕可用、name 空白。

預期看到

sequence=idle>error>loading>success>idle、busyDuring=true、disabledDuring=true、errorFocus=async-name-input、finalState=idle。

state='loading'; aria-busy=true; button.disabled=true;錯誤 nameInput.focus();finally state='idle'。

檔案清單

只在本階段資料夾內操作,避免改到其他章節。

證據:sequence、busyDuring/disabledDuring、errorFocus、finalState 全部符合

前往 Checkpoint →