-
Notifications
You must be signed in to change notification settings - Fork 124
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
W-12627197 -v3/template-retail-app Indicate live regions for dynamically changing content #1825
W-12627197 -v3/template-retail-app Indicate live regions for dynamically changing content #1825
Conversation
packages/template-retail-react-app/app/components/item-variant/item-price.jsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment about tests. Otherwise LGTM
packages/template-retail-react-app/app/components/display-price/current-price.jsx
Show resolved
Hide resolved
@@ -73,7 +73,7 @@ const RecommendedProducts = ({zone, recommender, products, title, shouldFetch, . | |||
getRecommendations(recommender, _products) | |||
return | |||
} | |||
}, [zone, recommender, _products]) | |||
}, [zone, recommender]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@unandyala I found a weird behavior in cart page when the recommendation section "You May also like" refetch every time we change quantity in the basket, which I find unnecessary. This is also the reason the screen reader read out lout so much updates than we expect. Hence I decided to remove the _product to not refetch on quantity change. These products will be fetched once when cart page is loaded.
By removing this, we don't need to have isLiveRegion
for the price components. Let me know if you have any concern. Thanks
@@ -6,7 +6,8 @@ | |||
- Display different pricing for various products on Product tiles and PDP [#1760](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1760) | |||
- Display pricing for cart, checkout and wishlist page [#1796](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1796) | |||
- Shows promotional callout message on Product List and Product Detail pages [#1786](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1786) [#1804](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1804) | |||
|
|||
- [a11y] Update live region for display price [#1825](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1825) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Looking at this PR we are applying updates for aria live support to multiple components, not just the component. If the list isn't too long I'd also add them in this comment, otherwise simple add something like "added live region suppose to components"
Description
This PR updates the code to make sure dynamic content is visible to screen reader in cart product-item and order summary for v3 retail app template
NOTE: When you test this PR, there is a current bug in Recommendation Component that caused it to re-render every time shopper changes basket item quantity in cart page. As a result, the screen reader will read it out loud following a quantity changes which can be a lot of noise.
A PR will be created to address that issue separately from this PR
a11y.live.region.v3.mov
Types of Changes
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization