All form fields need programmatically associated labels
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 82
- Forks
- 21
- Avg merge
- 35m
- Merged PRs (30d)
- 1
Description
Individual Field Labels
For fields with same parent, you can wrap label:
<label>Name: <input type="text"></label>
Beauty of this is you need no id. The other approach requires a unique id:
<tr>
<td><label for="name">Name</label></td>
<td><input type="text" id="name"></td>
</tr>
With this approach, label and labeled can be anywhere.
Group Labels
Radio buttons and checkbox groups require a group label, as well as individual labels. fieldset/legend is one way, but role="group" may be more appropriate in some situations.
<fieldset><legend>favorite ice cream flavor</legend>
<label><input type="radio"> chocolate</label>
<label><input type="radio"> vanilla</label>
</fieldset>
- when radio button gains focus, legend is read first, then local label (chocolate / vanilla)
- for longer group labels, or where a heading is useful, fieldset will not work; use group / radiogroup (not requires id)
<div role="radiogroup" aaria-labelledby="flavor-label">
<h2 id="flavor-label">favorite ice cream flavor</h2>
<label><input type="radio"> chocolate</label>
<label><input type="radio"> vanilla</label>
</div>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the repository's form markup and inventory fields, radio buttons, and checkbox groups that lack the associations described in the issue. Confirm each individual field has a label and each group has an appropriate group label, then verify the rendered forms expose those names to assistive technology.
Written by the indexing model from the issue text.
Assessment
- Domain
- accessibility
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100