Skip to content

Commit

Permalink
fix(storefront): BCTHEME-361 fix subscription message announcement (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-alexsaiannyi committed Jan 19, 2021
1 parent ea01df7 commit 87779e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Draft
- Fixed announcement of subscription message. [#1952](https://github.com/bigcommerce/cornerstone/pull/1952)
- Error message on PLPs not announced by screen reader. [#1956](https://github.com/bigcommerce/cornerstone/pull/1956)
- Add Play/Pause button to carousel. [#1944](https://github.com/bigcommerce/cornerstone/pull/1944)
- Alt text not provided for ratings. [#1949](https://github.com/bigcommerce/cornerstone/pull/1949)
Expand Down
7 changes: 6 additions & 1 deletion templates/pages/subscribed.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<section class="page">
<div class="page-content page-content--centered">
<h1 class="page-heading" tabindex="0">
<h1 class="page-heading" tabindex="0" role="status" aria-live="assertive">
{{#if subscription.error}}
{{lang 'newsletter.subscribed_heading_error'}}
{{else}}
Expand All @@ -19,5 +19,10 @@ <h1 class="page-heading" tabindex="0">
</div>
</section>

<script>
const subscriptionStatusElement = document.querySelector('.page-content > .page-heading');
if (subscriptionStatusElement) subscriptionStatusElement.focus();
</script>

{{/partial}}
{{> layout/base}}

0 comments on commit 87779e3

Please sign in to comment.