SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
283 stars 130 forks source link

W-12627197 - Indicate live regions for dynamically changing content #1820

Closed alexvuong closed 3 months ago

alexvuong commented 4 months ago

Description

This PR updates the code to make sure dynamic content is visible to screen reader in cart product-item and order summary

https://github.com/SalesforceCommerceCloud/pwa-kit/assets/52219283/28b05625-0870-4667-bdc0-eb2ae4aae142

Types of Changes

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

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

alexvuong commented 3 months ago

Note: Since we are setting these live-region to be "polite", the screen reader will wait until previous message to finish before announcing the newly update values, please expect some delay from screen reader when you see prices has updated

alexvuong commented 3 months ago

since we are releasing v3/retail-app-template soon, let's not merge this change into develop to avoid conflict. We have the fix for v3 template at #1825