[{"id":"webaccessibilitybeginner-001","courseId":"web-accessibility-beginner","domain":"semantic-html","topic":"Heading levels","prompt":"A page has the headings below in this markup. A screen reader builds a list of the page's headings so a user can jump between them. Put these five entries in the order that list shows them.","hint":"The list keeps the page's structure, so think about where each heading sits in the page.","explain":"A screen reader can list a page's headings for someone who can't see the layout. Consider what such a list must preserve so a reader can follow the page's structure.","source":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements","interaction":{"type":"sort","items":[{"text":"h1 Beetles","why":"The highest level comes first, and this is the top-level heading."},{"text":"h2 Evolution","why":"A level-2 section, listed before the subsections that belong to it."},{"text":"h3 Late Paleozoic","why":"A subsection of Evolution, so it is listed right after that section's heading."},{"text":"h2 External Morphology","why":"A new level-2 section starts here, so the list returns to level 2."},{"text":"h4 Mouthparts","why":"A level-4 subsection nested under a level-3 heading, so it is listed after its parent."}]},"options":[],"answer":"o:abcde","explanation":"A screen reader can list all the headings on a page, and that list reflects the page's structure, with each heading's level shown.","concept":"A screen reader can list all the headings on a page, and that list reflects the page's structure, with each heading's level shown.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","code":"<h1>Beetles</h1>\n<h2>Etymology</h2>\n<h2>Distribution and Diversity</h2>\n<h2>Evolution</h2>\n<h3>Late Paleozoic</h3>\n<h3>Jurassic</h3>\n<h3>Cretaceous</h3>\n<h3>Cenozoic</h3>\n<h2>External Morphology</h2>\n<h3>Head</h3>\n<h4>Mouthparts</h4>","takeaways":["Headings are a page outline for screen reader users; keep them in order and don't skip levels."]},{"id":"webaccessibilitybeginner-002","courseId":"web-accessibility-beginner","domain":"semantic-html","topic":"Main landmark","prompt":"A page template puts a main element around its body content. A second main element, with no hidden attribute, sits in the sidebar. What does the HTML standard say?","hint":"Count how many of this element a document is allowed to show at once.","explain":"Assistive technology lets people jump between a page's large regions, so each kind of region should be unambiguous. Think about how many of one kind a document may hold, and how the hidden attribute affects that count.","source":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/main","interaction":{"type":"single"},"options":[{"id":"a","text":"Not allowed: only one main element may be left unhidden","why":"A document mustn't have more than one main element that lacks the hidden attribute."},{"id":"b","text":"Allowed, since each main element marks a different region","whyNot":"Marking different regions doesn't change the rule; the limit applies to the document as a whole."},{"id":"c","text":"Allowed, as long as the second one sits inside an article","whyNot":"Where the element sits doesn't lift the limit on unhidden main elements."},{"id":"d","text":"Allowed, because main is only a styling hook with no meaning","whyNot":"The main element behaves like a main landmark, so it has meaning for assistive technology."}],"answer":"a","explanation":"A document mustn't have more than one main element that doesn't have the hidden attribute specified.","concept":"A document mustn't have more than one main element that doesn't have the hidden attribute specified.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["A page should have one visible main element holding its central content."]},{"id":"webaccessibilitybeginner-003","courseId":"web-accessibility-beginner","domain":"semantic-html","topic":"Default button type in forms","prompt":"A form contains a button with no type attribute. A visitor clicks it while the button is inside the form. What kind of button is it?","hint":"Look at where the button sits and what its type attribute says.","explain":"A button's behavior depends on the form around it and on one attribute the button can carry. Consider how a button placed inside a form relates to that form when it is clicked, and what the attribute can change.","source":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button","interaction":{"type":"single"},"options":[{"id":"a","text":"A submit button","why":"The page says a button inside a form that doesn't have type='button' is a submit button."},{"id":"b","text":"A reset button that clears the form's fields","whyNot":"The page describes this button as a submit button, not one that clears the fields."},{"id":"c","text":"A plain button that does nothing when clicked","whyNot":"Only a button with type='button' is excluded from being a submit button; this one isn't that."},{"id":"d","text":"A link that navigates to the form's action URL","whyNot":"A button element is not a link; the page classifies this one as a submit button."}],"answer":"a","explanation":"A button inside a form that doesn't have type='button' is a submit button.","concept":"A button inside a form that doesn't have type='button' is a submit button.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Give buttons that should not submit a form type='button' so they don't act as submit buttons."]},{"id":"webaccessibilitybeginner-004","courseId":"web-accessibility-beginner","domain":"semantic-html","topic":"Label element association","prompt":"A text box needs a visible caption that assistive technology can read. Which TWO approaches correctly associate a label element with its form control?","hint":"A label needs a link to its control, and markup offers more than one way to make one.","explain":"Visible text next to a control only helps someone using a screen reader if the software knows which control it belongs to. Think about what kinds of links markup can express between two elements.","source":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/label","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"Nest the input inside the label element","why":"Wrapping the control inside its label is the implicit association the page describes."},{"id":"b","text":"Give the input an id and point the label's for at it","why":"This is the explicit association: the for attribute must match the control's id."},{"id":"c","text":"Give the label and the input the same class name","whyNot":"Classes exist for styling and don't connect a label to its control."},{"id":"d","text":"Give the input a name attribute that matches the label's words","whyNot":"The name attribute identifies the field in submitted data; label association comes from label markup."},{"id":"e","text":"Put the label's words in an h3 heading placed just above the input","whyNot":"A heading beside a control isn't linked to it, and headings inside labels also disrupt assistive technology."},{"id":"f","text":"Give the label a tabindex so it can take focus","whyNot":"A tabindex decides whether an element can take focus; it doesn't link a label to a control."}],"answer":"ab","explanation":"A label associates with a control explicitly, with for matching the control's id, or implicitly, by nesting the control inside the label.","concept":"A label associates with a control explicitly, with for matching the control's id, or implicitly, by nesting the control inside the label.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Use explicit for and id association for the widest tool support."]},{"id":"webaccessibilitybeginner-005","courseId":"web-accessibility-beginner","domain":"semantic-html","topic":"Fieldset and legend","prompt":"Four radio buttons ask a visitor to pick a favorite monster. Which element gives the whole set of radio buttons its caption?","hint":"The caption belongs to the set as a whole, not to one control.","explain":"Related controls can sit together in one container that marks them as a set. A set can need a name of its own, distinct from the name of any single control inside it.","source":"https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/fieldset","interaction":{"type":"single"},"options":[{"id":"a","text":"A <legend> nested inside the group","why":"The page says the caption for a fieldset is given by the first legend element nested inside it."},{"id":"b","text":"A <label> placed before the first radio button","whyNot":"A label names one control; it cannot caption a whole set of controls."},{"id":"c","text":"A title attribute on the group's container","whyNot":"A title attribute is a tooltip; the caption of a set comes from a nested element instead."},{"id":"d","text":"A <caption> element above the first radio button","whyNot":"The caption element belongs to tables and doesn't caption a set of form controls."}],"answer":"a","explanation":"A fieldset's caption is given by the first legend element nested inside it.","concept":"A fieldset's caption is given by the first legend element nested inside it.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Group related controls in a fieldset and give it a legend to caption the set."]}]