{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-form-labels-8afa2f8a0290","title":"Ensure Form Controls Have Associated Labels","summary":"This skill ensures that all form controls are properly labeled with `<label>` elements connected via `for` and `id` attributes, improving accessibility for screen readers and users with motor impairments. The deliverable is a review of HTML forms with flagged issues such as placeholder-only labels or missing fieldset legends.","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-form-labels-8afa2f8a0290","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-form-labels-8afa2f8a0290","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-form-labels-8afa2f8a0290.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-form-labels-8afa2f8a0290\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before running the check, ensure that the HTML is rendered and accessible names are programmatically associated. Replace placeholder text with real label text and wrap related controls in `<fieldset>` with a `<legend>` when applicable.","instructions":"---\nname: form-labels\ndescription: \"Use when reviewing rendered HTML, interactive components, or design-system patterns related to Associate labels with form controls. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.\"\nmetadata:\n  category: accessibility\n  priority: critical\n  difficulty: beginner\n  estimatedTime: \"5\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/accessibility\/form-labels\n---\n\n# Associate labels with form controls\n\nProperly associated labels ensure that screen readers can identify the purpose of form inputs and increase the clickable area for users with motor impairments.\n\n## Quick Reference\n\n- Use `<label>` elements for all form inputs\n- Connect labels using `for` and `id` attributes\n- Placeholder text is not a label and must not be the only field name\n- Use `<fieldset>` and `<legend>` when multiple controls share one question\n- Ensure every input has a clear, accessible name\n\n## Check\n\nVerify that all form controls (input, select, textarea) have programmatically associated labels using the 'for' and 'id' attributes. Flag placeholder-only labels and grouped controls that lack a fieldset legend.\n\n## Fix\n\nAdd a <label> element with a 'for' attribute that matches the 'id' of the corresponding input field. Replace placeholder-only labels with real label text and wrap related checkboxes or radio buttons in a `<fieldset>` with a `<legend>`.\n\n## Explain\n\nExplain why associated labels are critical for screen reader users and how they improve the hit area for touch and mouse users.\n\n## Code Review\n\nReview the rendered markup and interactive states that affect Associate labels with form controls. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech. Specifically check for placeholder-only labels and question groups that visually share a heading but lack a semantic `<fieldset>` and `<legend>`.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/accessibility\/form-labels\n","use_cases":["Reviewing HTML forms for accessibility compliance","Testing form controls for screen reader compatibility","Improving usability for users with motor impairments"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/form-labels\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-23","created_at":"2026-11-22T16:16:38.000000Z","updated_at":"2026-11-23T04:55:09.000000Z","seo_title":"Ensure Form Controls Have Associated Labels","seo_description":"Ensure all form controls have associated labels for accessibility. Check labels, focus, and screen-reader compatibility.","seo_keywords":["form labels accessibility","screen reader compatibility","accessible form controls"]}}