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

AC-3522::Product search result with items count is not being read by … #3935

Merged
merged 8 commits into from
Sep 28, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const FilterSidebar = props => {
className={classes.root}
ref={filterRef}
data-cy="FilterSidebar-root"
aria-live="polite"
aria-busy="false"
>
<div className={classes.body}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
exports[`renders if \`items\` is an array of objects 1`] = `
<div
aria-busy="false"
aria-live="polite"
className="root"
>
<div
className="items"
>
<div
aria-busy="false"
aria-live="polite"
className="root"
>
<div
Expand Down Expand Up @@ -106,8 +103,6 @@ exports[`renders if \`items\` is an array of objects 1`] = `
</div>
</div>
<div
aria-busy="false"
aria-live="polite"
className="root"
>
<div
Expand Down Expand Up @@ -208,7 +203,6 @@ exports[`renders if \`items\` is an array of objects 1`] = `
exports[`renders if \`items\` is an empty array 1`] = `
<div
aria-busy="false"
aria-live="polite"
className="root"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ exports[`renders a placeholder item while awaiting item 1`] = `

exports[`renders correctly with valid item data 1`] = `
<div
aria-busy="false"
aria-live="polite"
className="root"
>
<a
Expand Down
7 changes: 1 addition & 6 deletions packages/venia-ui/lib/components/Gallery/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ const Gallery = props => {
);

return (
<div
data-cy="Gallery-root"
className={classes.root}
aria-live="polite"
aria-busy="false"
>
<div data-cy="Gallery-root" className={classes.root} aria-busy="false">
<div className={classes.items}>{galleryItems}</div>
</div>
);
Expand Down
8 changes: 1 addition & 7 deletions packages/venia-ui/lib/components/Gallery/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,7 @@ const GalleryItem = props => {
// ) : null;

return (
<div
data-cy="GalleryItem-root"
className={classes.root}
aria-live="polite"
aria-busy="false"
ref={itemRef}
>
<div data-cy="GalleryItem-root" className={classes.root} ref={itemRef}>
<Link
onClick={handleLinkClick}
to={productLink}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
exports[`renders correctly 1`] = `
<div
aria-busy="false"
aria-live="polite"
>
<button
disabled={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ const ProductSort = props => {
ref={elementRef}
className={classes.root}
data-cy="ProductSort-root"
aria-live="polite"
aria-busy="false"
>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ exports[`Search Page Component error view does not render when data is present 1
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<mock-FormattedMessage
Expand Down Expand Up @@ -84,6 +86,8 @@ exports[`Search Page Component error view renders when data is not present and n
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
/>
<div
Expand Down Expand Up @@ -128,6 +132,8 @@ exports[`Search Page Component filter button/modal does not render if there are
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<mock-FormattedMessage
Expand Down Expand Up @@ -206,6 +212,8 @@ exports[`Search Page Component filter button/modal renders when there are filter
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<mock-FormattedMessage
Expand Down Expand Up @@ -291,6 +299,8 @@ exports[`Search Page Component loading indicator does not render when data is pr
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<Shimmer
Expand Down Expand Up @@ -360,6 +370,8 @@ exports[`Search Page Component loading indicator renders when data is not presen
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<Shimmer
Expand Down Expand Up @@ -430,6 +442,8 @@ exports[`Search Page Component search results does not render if data returned h
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<Shimmer
Expand Down Expand Up @@ -484,6 +498,8 @@ exports[`Search Page Component search results heading renders a generic message
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<mock-FormattedMessage
Expand Down Expand Up @@ -586,6 +602,8 @@ exports[`Search Page Component search results heading renders a specific message
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<mock-FormattedMessage
Expand Down Expand Up @@ -695,6 +713,8 @@ exports[`Search Page Component search results renders if data has items 1`] = `
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<Shimmer
Expand Down Expand Up @@ -764,6 +784,8 @@ exports[`Search Page Component sort button/container does not render if total co
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<mock-FormattedMessage
Expand Down Expand Up @@ -819,6 +841,8 @@ exports[`Search Page Component sort button/container renders when total count >
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<mock-FormattedMessage
Expand Down Expand Up @@ -921,6 +945,8 @@ exports[`Search Page Component total count renders 0 items if data.products.tota
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<mock-FormattedMessage
Expand Down Expand Up @@ -976,6 +1002,8 @@ exports[`Search Page Component total count renders results from data 1`] = `
className="heading"
>
<div
aria-atomic="true"
aria-live="polite"
className="searchInfo"
>
<mock-FormattedMessage
Expand Down
6 changes: 5 additions & 1 deletion packages/venia-ui/lib/components/SearchPage/searchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ const SearchPage = props => {
</div>
<div className={classes.searchContent}>
<div className={classes.heading}>
<div className={classes.searchInfo}>
<div
aria-live="polite"
aria-atomic="true"
className={classes.searchInfo}
>
{searchResultsHeading}
{itemCountHeading}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const SortedByContainer = props => {
const classes = useStyle(defaultClasses, props.classes);

return (
<div className={classes.root} aria-live="polite" aria-busy="true">
<div className={classes.root} aria-busy="true">
<FormattedMessage
id={'searchPage.sortContainer'}
defaultMessage={'Items sorted by '}
Expand Down