Skip to content

collection_radio_buttons not accessible #763

@Bubballoo3

Description

@Bubballoo3

Using the collection_radio_buttons creates a label for the collection as well as a label for each radio button as seen here

bootstrap_form/README.md

Lines 768 to 778 in f947b14

<div class="mb-3">
<label class="form-label" for="user_skill_level">Skill level</label>
<div class="form-check">
<input class="form-check-input" id="user_skill_level_1" name="user[skill_level]" type="radio" value="1">
<label class="form-check-label" for="user_skill_level_1">Mind reading</label>
</div>
<div class="form-check">
<input class="form-check-input" id="user_skill_level_2" name="user[skill_level]" type="radio" value="2">
<label class="form-check-label" for="user_skill_level_2">Farming</label>
</div>
</div>

which confuses screenreaders as well as tab navigation. Using a different element like legend or allowing some end customization or removal of the label would probably fix.

[Edit] The same issue exists for checkboxes, so this issue should apply to collection_checkboxes as well.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions