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

Fix: a11y - Improve accessibility readout for strike through shipping price @W-12627112@ #1892

Merged
merged 7 commits into from
Jul 16, 2024

Conversation

joeluong-sfcc
Copy link
Collaborator

@joeluong-sfcc joeluong-sfcc commented Jul 11, 2024

Description

This PR improves the readout of the shipping options when there is a strikethrough price in the shipping options section on the checkout page. Previously there was no indication that there was a strike through price, so the screen reader would read both the current price and the strikethrough price.

Example: 'Free 1.99'

Now the screenreader explicitly states the original and current price:

Example: 'Originally 1.99, now Free'

Screenshot 2024-07-11 at 3 50 49 PM

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

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

  • (change1)

How to Test-Drive This PR

  1. git checkout ju/a11y-shipping-options
  2. start retail react app
  3. add products to the cart such that you activate a shipping promotion. On my instance, I have a promotion active such that adding 5 pairs of shoes or more gets you free shipping.
  4. Go to the checkout page all the way to shipping options
  5. enable the screen reader, for macOS its VoiceOver
  6. tab all the way where the screen reader reads out the Shipping Options header making sure its in preview mode
  7. If you're using voice over, press command + option + shift + down arrow and then option + control + a in order to get the screen reader to start reading off the text
  8. Observe that the screen reader reads the strikethrough price as Originally ____, now _____

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@joeluong-sfcc joeluong-sfcc requested a review from a team as a code owner July 11, 2024 19:43
@@ -210,6 +232,7 @@ export default function ShippingOptions() {
textDecoration="line-through"
color="gray.600"
marginLeft={1}
aria-hidden="true"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set aria-hidden="true" so that the screen reader doesn't repeat the price as it would add confusion

shethj
shethj previously approved these changes Jul 15, 2024
adamraya
adamraya previously approved these changes Jul 16, 2024
…/shipping-options.jsx

Co-authored-by: Adam Raya <[email protected]>
Signed-off-by: Joel Uong <[email protected]>
@joeluong-sfcc joeluong-sfcc dismissed stale reviews from adamraya and shethj via 4b520f7 July 16, 2024 13:40
@joeluong-sfcc joeluong-sfcc merged commit 19ccd74 into develop Jul 16, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants