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

feature(storefront): BCTHEME-133 Improper footer heading hierarchy #1760

Merged
merged 1 commit into from
Aug 26, 2020
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Draft

- Improper footer heading hierarchy. [#1760](https://github.com/bigcommerce/cornerstone/pull/1760/files)

## 4.9.0 (07-28-2020)
- Added correct alt text on image change in product view. [#1747](https://github.com/bigcommerce/cornerstone/pull/1747)
- Description tab is hidden in case of empty product descrioption. [#1746](https://github.com/bigcommerce/cornerstone/pull/1746)
Expand Down
10 changes: 10 additions & 0 deletions assets/scss/layouts/footer/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
background-color: $footer-background;
border-top: container("border");
padding: spacing("double") 0;
position: relative;
}

.footer-title-sr-only {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}

.footer-info {
Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"skip_to_main": "Skip to main content"
},
"footer": {
"title": "Footer Start",
"brands": "Popular Brands",
"navigate": "Navigate",
"info": "Info",
Expand Down
11 changes: 6 additions & 5 deletions templates/components/common/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@

{{/if}}
<footer class="footer" role="contentinfo">
<h2 class="footer-title-sr-only">{{lang 'footer.title'}}</h2>
<div class="container">
{{#if theme_settings.social_icon_placement_bottom '!==' 'bottom_none'}}
<article class="footer-info-col
footer-info-col--social
footer-info-col--{{#if theme_settings.social_icon_placement_bottom '===' 'bottom_left'}}left{{else}}right{{/if}}"
data-section-type="footer-webPages">
<h5 class="footer-info-heading">{{lang 'social.connect'}}</h5>
<h3 class="footer-info-heading">{{lang 'social.connect'}}</h3>
{{> components/common/social-links}}
</article>
{{/if}}
<section class="footer-info">
<article class="footer-info-col footer-info-col--small" data-section-type="footer-webPages">
<h5 class="footer-info-heading">{{lang 'footer.navigate'}}</h5>
<h3 class="footer-info-heading">{{lang 'footer.navigate'}}</h3>
<ul class="footer-info-list">
{{#each pages}}
<li>
Expand All @@ -45,7 +46,7 @@ <h5 class="footer-info-heading">{{lang 'footer.navigate'}}</h5>
</article>

<article class="footer-info-col footer-info-col--small" data-section-type="footer-categories">
<h5 class="footer-info-heading">{{lang 'footer.categories'}}</h5>
<h3 class="footer-info-heading">{{lang 'footer.categories'}}</h3>
<ul class="footer-info-list">
{{#each categories}}
<li>
Expand All @@ -57,7 +58,7 @@ <h5 class="footer-info-heading">{{lang 'footer.categories'}}</h5>

{{#and theme_settings.shop_by_brand_show_footer shop_by_brand.length}}
<article class="footer-info-col footer-info-col--small" data-section-type="footer-brands">
<h5 class="footer-info-heading">{{lang 'footer.brands'}}</h5>
<h3 class="footer-info-heading">{{lang 'footer.brands'}}</h3>
<ul class="footer-info-list">
{{#each shop_by_brand}}
<li>
Expand All @@ -71,7 +72,7 @@ <h5 class="footer-info-heading">{{lang 'footer.brands'}}</h5>

{{#if settings.address}}
<article class="footer-info-col footer-info-col--small" data-section-type="storeInfo">
<h5 class="footer-info-heading">{{lang 'footer.info'}}</h5>
<h3 class="footer-info-heading">{{lang 'footer.info'}}</h3>
<address>{{nl2br settings.address}}</address>
{{#if settings.phone_number}}
<strong>{{lang 'footer.call_us' phone_number=settings.phone_number}}</strong>
Expand Down
2 changes: 1 addition & 1 deletion templates/components/common/subscription-form.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h5 class="footer-info-heading">{{lang 'newsletter.subscribe'}}</h5>
<h3 class="footer-info-heading">{{lang 'newsletter.subscribe'}}</h3>
<p>{{lang 'newsletter.subscribe_intro'}}</p>

<form class="form" action="{{urls.subscribe.action}}" method="post">
Expand Down