diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fde0240d1..5b7857fce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Draft +- Fixed announcement of reCAPTCHA hidden content by screen reader. [#1942](https://github.com/bigcommerce/cornerstone/pull/1942) - Carousel buttons do not receive focus. [#1937](https://github.com/bigcommerce/cornerstone/pull/1937) - Empty cart message not read by screen reader. [#1935](https://github.com/bigcommerce/cornerstone/pull/1935) - No tooltips provided for carousel buttons. [#1934](https://github.com/bigcommerce/cornerstone/pull/1934) diff --git a/assets/js/theme/auth.js b/assets/js/theme/auth.js index 23c11dfba2..f782993bd4 100644 --- a/assets/js/theme/auth.js +++ b/assets/js/theme/auth.js @@ -11,6 +11,7 @@ export default class Auth extends PageManager { super(context); this.validationDictionary = createTranslationDictionary(context); this.formCreateSelector = 'form[data-create-account-form]'; + this.recaptcha = $('[src^="https://www.google.com/recaptcha/api2"]'); } registerLoginValidation($loginForm) { @@ -175,6 +176,10 @@ export default class Auth extends PageManager { * Request is made in this function to the remote endpoint and pulls back the states for country. */ onReady() { + if (!this.recaptcha.attr('title')) { + this.recaptcha.attr('title', 'Google reCAPTCHA'); + } + const $createAccountForm = classifyForm(this.formCreateSelector); const $loginForm = classifyForm('.login-form'); const $forgotPasswordForm = classifyForm('.forgot-password-form');