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

Cart line-item error a11y #540

Merged
merged 3 commits into from
Sep 7, 2021
Merged

Cart line-item error a11y #540

merged 3 commits into from
Sep 7, 2021

Conversation

ludoboludo
Copy link
Contributor

@ludoboludo ludoboludo commented Sep 1, 2021

Why are these changes introduced?

Fixes #471

What approach did you take?

Followed the recommendations posted in the issue. Added a role="status" on the error text and changed the elements used.

Other considerations

This isn't fixing: #398

Demo links

Checklist

@svinkle
Copy link
Member

svinkle commented Sep 1, 2021

@ludoboludo Which product can I use to test with?

@ludoboludo
Copy link
Contributor Author

@ludoboludo Which product can I use to test with?

You can use the Test 3D models, video one that should show up on the home page in the feat. collection section. If you add that one to the cart, the default variant selected, you shouldn't be able to raise the quantity above 1 or 2.

@svinkle
Copy link
Member

svinkle commented Sep 1, 2021

@ludoboludo There's a few other live announcements happening which pushes this to the end. I'm curious how it would sound when swapping role="status" with the more urgent role="alert". I'm also considering adding a visually hidden "Error:" string to the beginning of the text to make the current state known.

@svinkle
Copy link
Member

svinkle commented Sep 1, 2021

@ludoboludo I think I also discovered a bug while testing this. If you adjust the input value and press Enter, the new value goes through and no error is displayed.

Gif

Gif of Cart form showing keyboard user updating the quantity input, pressing enter, and the form updating with the new value. No error state is displayed.

@ludoboludo
Copy link
Contributor Author

ludoboludo commented Sep 2, 2021

For now I will just fix the issue the PR is linked to but I'll create an issue so that we can check on page load to make sure the quantities shown are accurate. From what I'm seeing when entering the number and pressing Enter, it trigger the function to check the quantity but because it ends up reloading the page, it actually goes through. We need to run a check on page load.

It only seems to happen when there one item only in the cart 🤔

Looks like there is an issue created for this: #380 to which I added a video showing the issue you found Scott.

@tauthomas01 tauthomas01 self-assigned this Sep 7, 2021
Copy link
Contributor

@tauthomas01 tauthomas01 left a comment

Choose a reason for hiding this comment

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

Tested with VO and it is announced: video

@ludoboludo ludoboludo merged commit b289138 into main Sep 7, 2021
@ludoboludo ludoboludo deleted the cart-line-item-error branch September 7, 2021 18:32
@martinamarien martinamarien mentioned this pull request Sep 13, 2021
phapsidesGT pushed a commit to Gravytrain-UK/gt-shopify-dawn-theme that referenced this pull request Sep 3, 2024
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.

[Cart] Line item error text not announced via assistive technology
3 participants