From 85f08bc13686b7ac24f7c8d601742692660b582e Mon Sep 17 00:00:00 2001 From: Steffen Lindner Date: Fri, 23 Aug 2024 09:02:14 +0200 Subject: [PATCH 1/4] Add missing for-attribute and (hidden) label to input (#6249) --- packages/components/news/6249.fix | 1 + .../manage/Blocks/Search/components/CheckboxFacet.jsx | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 packages/components/news/6249.fix diff --git a/packages/components/news/6249.fix b/packages/components/news/6249.fix new file mode 100644 index 0000000000..6e28743161 --- /dev/null +++ b/packages/components/news/6249.fix @@ -0,0 +1 @@ +Add missing `for` attribute to checkbox label to improve accessibility. @gomez \ No newline at end of file diff --git a/packages/volto/src/components/manage/Blocks/Search/components/CheckboxFacet.jsx b/packages/volto/src/components/manage/Blocks/Search/components/CheckboxFacet.jsx index c4b86c1147..71d08c180e 100644 --- a/packages/volto/src/components/manage/Blocks/Search/components/CheckboxFacet.jsx +++ b/packages/volto/src/components/manage/Blocks/Search/components/CheckboxFacet.jsx @@ -21,8 +21,10 @@ const CheckboxFacet = (props) => { {choices.map(({ label, value }, i) => (
Date: Fri, 23 Aug 2024 09:10:52 +0200 Subject: [PATCH 2/4] Update test snapshot --- .../__snapshots__/CheckboxFacet.test.jsx.snap | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/volto/src/components/manage/Blocks/Search/components/__snapshots__/CheckboxFacet.test.jsx.snap b/packages/volto/src/components/manage/Blocks/Search/components/__snapshots__/CheckboxFacet.test.jsx.snap index 35403900ec..81002db9f6 100644 --- a/packages/volto/src/components/manage/Blocks/Search/components/__snapshots__/CheckboxFacet.test.jsx.snap +++ b/packages/volto/src/components/manage/Blocks/Search/components/__snapshots__/CheckboxFacet.test.jsx.snap @@ -17,6 +17,7 @@ exports[`CheckboxFacet renders a facet component with checkboxes 1`] = ` >
-
@@ -39,6 +43,7 @@ exports[`CheckboxFacet renders a facet component with checkboxes 1`] = ` >
-
From 9631c13f61d1112008f16aef7fd53e23b57dfabb Mon Sep 17 00:00:00 2001 From: David Ichim Date: Tue, 24 Sep 2024 09:58:28 +0200 Subject: [PATCH 3/4] Move news to volto package and removed htmlFor added wrongfully for the label div parent --- packages/{components => volto}/news/6249.fix | 0 .../manage/Blocks/Search/components/CheckboxFacet.jsx | 1 - .../Search/components/__snapshots__/CheckboxFacet.test.jsx.snap | 2 -- 3 files changed, 3 deletions(-) rename packages/{components => volto}/news/6249.fix (100%) diff --git a/packages/components/news/6249.fix b/packages/volto/news/6249.fix similarity index 100% rename from packages/components/news/6249.fix rename to packages/volto/news/6249.fix diff --git a/packages/volto/src/components/manage/Blocks/Search/components/CheckboxFacet.jsx b/packages/volto/src/components/manage/Blocks/Search/components/CheckboxFacet.jsx index 71d08c180e..7d0665054f 100644 --- a/packages/volto/src/components/manage/Blocks/Search/components/CheckboxFacet.jsx +++ b/packages/volto/src/components/manage/Blocks/Search/components/CheckboxFacet.jsx @@ -24,7 +24,6 @@ const CheckboxFacet = (props) => { id={value} disabled={isEditMode} label={label} - htmlFor={value} radio={!isMulti} checked={ isMulti diff --git a/packages/volto/src/components/manage/Blocks/Search/components/__snapshots__/CheckboxFacet.test.jsx.snap b/packages/volto/src/components/manage/Blocks/Search/components/__snapshots__/CheckboxFacet.test.jsx.snap index 81002db9f6..a4505d82d8 100644 --- a/packages/volto/src/components/manage/Blocks/Search/components/__snapshots__/CheckboxFacet.test.jsx.snap +++ b/packages/volto/src/components/manage/Blocks/Search/components/__snapshots__/CheckboxFacet.test.jsx.snap @@ -17,7 +17,6 @@ exports[`CheckboxFacet renders a facet component with checkboxes 1`] = ` >
Date: Tue, 24 Sep 2024 10:00:45 +0200 Subject: [PATCH 4/4] Rename .fix to .bugfix for issue entry --- packages/volto/news/{6249.fix => 6249.bugfix} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/volto/news/{6249.fix => 6249.bugfix} (100%) diff --git a/packages/volto/news/6249.fix b/packages/volto/news/6249.bugfix similarity index 100% rename from packages/volto/news/6249.fix rename to packages/volto/news/6249.bugfix