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

@W-12627191: add error icon to error message #1839

Merged
merged 5 commits into from
Jun 19, 2024

Conversation

unandyala
Copy link
Collaborator

Add error/red icon to the error message so that People who are blind, colorblind, or using a monochrome screen will be able detect error messages. This impacts multiple fields

  1. promo code
  2. Address fields
  3. credit card fields
  4. login fields
  5. password change fields
  6. registration fields
pwa-kit_add-error-icon.mov

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)

How to Test-Drive This PR

  1. Checkout code
  2. Run Retail App template
  3. Add a few items in cart
  4. Go to Cart Page
  5. Open VoiceOver (Cmd + f5)
  6. Follow the steps in the demo video

@unandyala unandyala requested a review from a team as a code owner June 17, 2024 21:35
@@ -29,11 +29,7 @@ import OrderSummary from '@salesforce/retail-react-app/app/components/order-summ
import {useCurrentCustomer} from '@salesforce/retail-react-app/app/hooks/use-current-customer'
import {useCurrentBasket} from '@salesforce/retail-react-app/app/hooks/use-current-basket'
import CheckoutSkeleton from '@salesforce/retail-react-app/app/pages/checkout/partials/checkout-skeleton'
import {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FYI - just removed unused variable. NO FUNCTIONAL CHANGES in this file

Copy link
Contributor

@vcua-mobify vcua-mobify Jun 18, 2024

Choose a reason for hiding this comment

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

I think this usid was used before when we had to pass in the SLAS usid to the SCAPI createOrder call for Einstein purposes (we no longer need to do so). We probably forgot to remove it here when we took that out.

This is safe to remove.

@vcua-mobify
Copy link
Contributor

Thanks @unandyala . I tested the changes on my local and have verified that voiceover works on the modified error messages.

One small nit however. Do we want the icon on this error message as well (appears when not all the options are selected on the PDP)

Screenshot 2024-06-17 at 2 55 52 PM

@alexvuong
Copy link
Collaborator

alexvuong commented Jun 17, 2024

When I apply invalid code for promocode, the error shows up, the focus should focus back to the input so the screen reader can read it out loud. Currently, the focus does not move back to the input, the screen reader will stop after you hit Apply. The users won't be able to know if the code they entered is valid or not via screen reader.

Note: We can create ticket to fix this behavior if you think it takes more time than like 1hr

STR

  • Go to cart page
  • Open Voiceover
  • Navigate to promoco input
  • Input invalid code and hit apply
  • Observe screen reader

@unandyala
Copy link
Collaborator Author

Thanks @unandyala . I tested the changes on my local and have verified that voiceover works on the modified error messages.

One small nit however. Do we want the icon on this error message as well (appears when not all the options are selected on the PDP)

Screenshot 2024-06-17 at 2 55 52 PM

@vcua-mobify Yes, we need error icon on PDP as well. However this is a different issue and I will create separate ticket for this.

@unandyala
Copy link
Collaborator Author

When I apply invalid code for promocode, the error shows up, the focus should focus back to the input so the screen reader can read it out loud. Currently, the focus does not move back to the input, the screen reader will stop after you hit Apply. The users won't be able to know if the code they entered is valid or not via screen reader.

Note: We can create ticket to fix this behavior if you think it takes more time than like 1hr

STR

  • Go to cart page
  • Open Voiceover
  • Navigate to promoco input
  • Input invalid code and hit apply
  • Observe screen reader

@alexvuong This is fixed now
image

@unandyala unandyala merged commit 6bedeb8 into develop Jun 19, 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