--- id: 62ff8e998d3e7eae14d6ae3b title: 步驟 28 challengeType: 0 dashedName: step-28 --- # --description-- 按照無障礙最佳實踐,將第二個 `fieldset` 內的 `input` 元素和 `label` 元素關聯起來。 使用 `personal-account`、`business-account` 和 `terms-and-conditions` 作爲對應的 `id` 屬性的值。 # --hints-- 第一個 `input` 元素的 `id` 應該爲 `personal-account`。 ```js assert(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[0]?.matches('#personal-account')) ``` 第二個 `input` 元素的 `id` 應該爲 `business-account`。 ```js assert(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[1]?.matches('#business-account')) ``` 第三個 `input` 元素的 `id` 應該爲 `terms-and-conditions`。 ```js assert(document.querySelectorAll('fieldset:nth-of-type(2) input')?.[2]?.matches('#terms-and-conditions')) ``` 第一個 `label` 元素的 `for` 屬性應該爲 `personal-account`。 ```js assert(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[0]?.matches('label[for="personal-account"]')) ``` 第二個 `label` 元素的 `for` 屬性應該爲 `business-account`。 ```js assert(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[1]?.matches('label[for="business-account"]')) ``` 第三個 `label` 元素的 `for` 屬性應該爲 `terms-and-conditions`。 ```js assert(document.querySelectorAll('fieldset:nth-of-type(2) label')?.[2]?.matches('label[for="terms-and-conditions"]')) ``` # --seed-- ## --seed-contents-- ```html Registration Form

Registration Form

Please fill out this form with the required information

--fcc-editable-region--
--fcc-editable-region--
``` ```css body { width: 100%; height: 100vh; margin: 0; background-color: #1b1b32; color: #f5f6f7; } label { display: block; margin: 0.5rem 0; } ```