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,7 +3,6 @@
exports[`renders if \`items\` is an array of objects 1`] = `
<div
aria-busy="false"
aria-live="polite"
className="root"
>
<div
Expand Down Expand Up @@ -208,7 +207,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
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
2 changes: 0 additions & 2 deletions packages/venia-ui/lib/components/Gallery/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ const GalleryItem = props => {
<div
data-cy="GalleryItem-root"
className={classes.root}
aria-live="polite"
aria-busy="false"
ref={itemRef}
>
<Link
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 @@ -21,7 +21,8 @@ exports[`Search Page Component error view does not render when data is present 1
id="searchPage.searchTermEmpty"
/>
<span
aria-live="polite"
aria-busy="true"
aria-live="assertive"
className="totalPages"
>
0 items
Expand Down Expand Up @@ -135,7 +136,8 @@ exports[`Search Page Component filter button/modal does not render if there are
id="searchPage.searchTermEmpty"
/>
<span
aria-live="polite"
aria-busy="true"
aria-live="assertive"
className="totalPages"
>
0 items
Expand Down Expand Up @@ -213,7 +215,8 @@ exports[`Search Page Component filter button/modal renders when there are filter
id="searchPage.searchTermEmpty"
/>
<span
aria-live="polite"
aria-busy="true"
aria-live="assertive"
className="totalPages"
>
0 items
Expand Down Expand Up @@ -491,7 +494,8 @@ exports[`Search Page Component search results heading renders a generic message
id="searchPage.searchTermEmpty"
/>
<span
aria-live="polite"
aria-busy="true"
aria-live="assertive"
className="totalPages"
>
1 items
Expand Down Expand Up @@ -600,7 +604,8 @@ exports[`Search Page Component search results heading renders a specific message
}
/>
<span
aria-live="polite"
aria-busy="true"
aria-live="assertive"
className="totalPages"
>
1 items
Expand Down Expand Up @@ -771,7 +776,8 @@ exports[`Search Page Component sort button/container does not render if total co
id="searchPage.searchTermEmpty"
/>
<span
aria-live="polite"
aria-busy="true"
aria-live="assertive"
className="totalPages"
>
0 items
Expand Down Expand Up @@ -826,7 +832,8 @@ exports[`Search Page Component sort button/container renders when total count >
id="searchPage.searchTermEmpty"
/>
<span
aria-live="polite"
aria-busy="true"
aria-live="assertive"
className="totalPages"
>
1 items
Expand Down Expand Up @@ -928,7 +935,8 @@ exports[`Search Page Component total count renders 0 items if data.products.tota
id="searchPage.searchTermEmpty"
/>
<span
aria-live="polite"
aria-busy="true"
aria-live="assertive"
className="totalPages"
>
0 items
Expand Down Expand Up @@ -983,7 +991,8 @@ exports[`Search Page Component total count renders results from data 1`] = `
id="searchPage.searchTermEmpty"
/>
<span
aria-live="polite"
aria-busy="true"
aria-live="assertive"
className="totalPages"
>
1 items
Expand Down
7 changes: 5 additions & 2 deletions packages/venia-ui/lib/components/SearchPage/searchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ const SearchPage = props => {

const itemCountHeading =
data && !loading ? (
<span aria-live="polite" className={classes.totalPages}>
<span
aria-live="polite"
className={classes.totalPages}
>
{formatMessage(
{
id: 'searchPage.totalPages',
Expand All @@ -199,7 +202,7 @@ 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