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

feat(checkout): CHECKOUT-7125 Adding additional aria attributes to coupon code and gift certificate buttons on the cart page #2391

Merged

Conversation

bc-NikitaPuzanenko
Copy link
Contributor

@bc-NikitaPuzanenko bc-NikitaPuzanenko commented Aug 23, 2023

What?

Adding aria-hidden attributes to coupon code and gift certificate containers on the cart page. Also adding aria labels to coupon code and gift certificate apply buttons on the cart page.

Requirements

  • CHANGELOG.md entry added (required for code changes only)

Screenshots (if appropriate)

After changes:
Screenshot 2023-08-23 at 4 42 50 PM

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@yurytut1993 yurytut1993 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

CHANGELOG.md Outdated Show resolved Hide resolved
…upon code and gift certificate buttons on the cart page
@BC-krasnoshapka BC-krasnoshapka merged commit b8154be into bigcommerce:master Jan 4, 2024
3 checks passed
@mattcoy-arcticleaf
Copy link
Contributor

aria-hidden should not be added to elements that are displayed none;

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden

@mattcoy-arcticleaf
Copy link
Contributor

Also, aria-labels should contain the visible label. I would recommend not using aria-labels here and instead change the visible text.

@yurytut1993
Copy link
Contributor

good points @mattcoy-arcticleaf
we will discuss and provide updates for that
thanks

@bc-yevhenii-buliuk
Copy link
Contributor

Also, aria-labels should contain the visible label. I would recommend not using aria-labels here and instead change the visible text.

@mattcoy-arcticleaf since we don't have suitable visible content on the UI to refer to, we have to use the aria-label attribute to give the element an accessible name.

@mattcoy-arcticleaf
Copy link
Contributor

@bc-yevhenii-buliuk , the submit input tag can be changed to a button tag and then you can place 1 or more spans inside.

@bc-yevhenii-buliuk
Copy link
Contributor

@mattcoy-arcticleaf yes, we can change the submit input to the button tag and add a span inside, but it will change the UI, the content inside the span will stretch the button width, which is not intended by the design.
For example, now the submit input is called
| Apply |
and by changing it to a button and adding a span inside, it can look like
| Apply gift certificate |

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.

None yet

5 participants