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

[a11y] More accessible MultiCheckboxFacets #319

Merged
merged 4 commits into from
Jul 9, 2019
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
6 changes: 3 additions & 3 deletions packages/react-search-ui-views/src/MultiCheckboxFacet.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ function MultiCheckboxFacet({
searchPlaceholder
}) {
return (
<div
<fieldset
className={appendClassName(
"sui-multi-checkbox-facet sui-facet",
className
)}
>
<div className="sui-multi-checkbox-facet__label">{label}</div>
<legend className="sui-multi-checkbox-facet__label">{label}</legend>

{showSearch && (
<div className="sui-facet-search">
Expand Down Expand Up @@ -91,7 +91,7 @@ function MultiCheckboxFacet({
+ More
</button>
)}
</div>
</fieldset>
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`renders 1`] = `
<div
<fieldset
className="sui-multi-checkbox-facet sui-facet"
>
<div
<legend
className="sui-multi-checkbox-facet__label"
>
A Facet
</div>
</legend>
<div
className="sui-multi-checkbox-facet__options-list"
>
Expand Down Expand Up @@ -75,18 +75,18 @@ exports[`renders 1`] = `
>
+ More
</button>
</div>
</fieldset>
`;

exports[`renders range filters 1`] = `
<div
<fieldset
className="sui-multi-checkbox-facet sui-facet"
>
<div
<legend
className="sui-multi-checkbox-facet__label"
>
A Facet
</div>
</legend>
<div
className="sui-multi-checkbox-facet__options-list"
>
Expand Down Expand Up @@ -153,5 +153,5 @@ exports[`renders range filters 1`] = `
>
+ More
</button>
</div>
</fieldset>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@
font-size: 13px;
display: flex;
flex-direction: column;
// fieldset reset
margin: 0;
padding: 0;
border: 0;

@include element("label") {
font-size: $sizeM;
color: $facetLabel;
text-transform: uppercase;
letter-spacing: 1px;
// legend reset
padding: 0;
}

@include element("options-list") {
Expand Down