Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing for-attribute #6249

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/volto/news/6249.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add missing `for` attribute to checkbox label to improve accessibility. @gomez
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const CheckboxFacet = (props) => {
{choices.map(({ label, value }, i) => (
<div className="entry" key={value}>
<Checkbox
id={value}
disabled={isEditMode}
label={label}
radio={!isMulti}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ exports[`CheckboxFacet renders a facet component with checkboxes 1`] = `
<input
checked={false}
className="hidden"
id="first"
readOnly={true}
tabIndex={0}
type="checkbox"
/>
<label>
<label
htmlFor="first"
>
First
</label>
</div>
Expand All @@ -47,11 +50,14 @@ exports[`CheckboxFacet renders a facet component with checkboxes 1`] = `
<input
checked={false}
className="hidden"
id="second"
readOnly={true}
tabIndex={0}
type="checkbox"
/>
<label>
<label
htmlFor="second"
>
Second
</label>
</div>
Expand Down
Loading