Skip to content

Commit

Permalink
Add missing for-attribute (#6249)
Browse files Browse the repository at this point in the history
Co-authored-by: ichim-david <[email protected]>
  • Loading branch information
Gomez and ichim-david authored Sep 24, 2024
1 parent 08aab5a commit 6429d49
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
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

0 comments on commit 6429d49

Please sign in to comment.