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(storefront): BCTHEME-1780 Content that functions as a list should be indicated as such to screen reader users #2429

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Draft
- Content that functions as a list should be indicated as such to screen reader users [#2429](https://github.com/bigcommerce/cornerstone/pull/2429)
- ADA Compliance - All form fields must be properly labeled [#2433](https://github.com/bigcommerce/cornerstone/pull/2433)
- ADA Compliance - Errors are not identified to screen reader users within the Refine By accordions [#2424](https://github.com/bigcommerce/cornerstone/pull/2424)
- ADA Compliance - Expandable items should be read by screen reader [2422](https://github.com/bigcommerce/cornerstone/pull/2422)
Expand Down
13 changes: 10 additions & 3 deletions assets/scss/layouts/footer/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
display: inline-block;
float: none;
font-size: fontSize("base"); // 2
margin-bottom: spacing("double");
overflow-wrap: break-word;
text-align: center;
vertical-align: top;
Expand Down Expand Up @@ -144,15 +143,23 @@
}

.footer-payment-icons {
height: remCalc(40);
display: flex;
flex-wrap: wrap;
justify-content: center;
list-style-type: none;
margin-left: 0;
margin-top: spacing("single");

@include breakpoint("small") {
justify-content: normal;
}

@include breakpoint("medium") {
margin-top: spacing("double");
}

.footer-payment-icon {
height: 100%;
height: remCalc(40);
margin: spacing("quarter");
vertical-align: middle;
width: remCalc(50);
Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@
"credit_card_number": "Credit Card Number",
"expiration": "Expiration",
"cvv": "CVV",
"payment_icons_label": "Payment icons",
"card_types": {
"american_express": "American Express",
"credit_card": "Credit Card",
Expand Down
60 changes: 50 additions & 10 deletions templates/components/common/payment-icons.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,70 @@
{{#with theme_settings}}
{{#or show_accept_amex show_accept_discover show_accept_mastercard show_accept_paypal show_accept_visa show_accept_amazonpay show_accept_googlepay show_accept_klarna}}
<div class="footer-payment-icons">
<ul class="footer-payment-icons" aria-label="{{lang 'account.payment_methods.payment_icons_label'}}">
{{#if show_accept_amex}}
<svg class="footer-payment-icon"><use href="#icon-logo-american-express"></use></svg>
<li>
<svg class="footer-payment-icon" role="img">
<title>American Express</title>
<use href="#icon-logo-american-express"></use>
</svg>
</li>
{{/if}}
{{#if show_accept_discover}}
<svg class="footer-payment-icon"><use href="#icon-logo-discover"></use></svg>
<li>
<svg class="footer-payment-icon" role="img">
<title>Discover</title>
<use href="#icon-logo-discover"></use>
</svg>
</li>
{{/if}}
{{#if show_accept_mastercard}}
<svg class="footer-payment-icon"><use href="#icon-logo-mastercard"></use></svg>
<li>
<svg class="footer-payment-icon" role="img">
<title>Mastercard</title>
<use href="#icon-logo-mastercard"></use>
</svg>
</li>
{{/if}}
{{#if show_accept_paypal}}
<svg class="footer-payment-icon"><use href="#icon-logo-paypal"></use></svg>
<li>
<svg class="footer-payment-icon" role="img">
<title>PayPal</title>
<use href="#icon-logo-paypal"></use>
</svg>
</li>
{{/if}}
{{#if show_accept_visa}}
<svg class="footer-payment-icon"><use href="#icon-logo-visa"></use></svg>
<li>
<svg class="footer-payment-icon" role="img">
<title>Visa</title>
<use href="#icon-logo-visa"></use>
</svg>
</li>
{{/if}}
{{#if show_accept_amazonpay}}
<svg class="footer-payment-icon"><use href="#icon-logo-amazonpay"></use></svg>
<li>
<svg class="footer-payment-icon" role="img">
<title>Amazon Pay</title>
<use href="#icon-logo-amazonpay"></use>
</svg>
</li>
{{/if}}
{{#if show_accept_googlepay}}
<svg class="footer-payment-icon"><use href="#icon-logo-googlepay"></use></svg>
<li>
<svg class="footer-payment-icon" role="img">
<title>Google Pay</title>
<use href="#icon-logo-googlepay"></use>
</svg>
</li>
{{/if}}
{{#if show_accept_klarna}}
<svg class="footer-payment-icon"><use href="#icon-logo-klarna"></use></svg>
<li>
<svg class="footer-payment-icon" role="img">
<title>Klarna</title>
<use href="#icon-logo-klarna"></use>
</svg>
</li>
{{/if}}
</div>
</ul>
{{/or}}
{{/with}}
Loading