diff --git a/theme/boost/amd/build/aria.min.js b/theme/boost/amd/build/aria.min.js index 37d107578f3..b823d5c6ed6 100644 --- a/theme/boost/amd/build/aria.min.js +++ b/theme/boost/amd/build/aria.min.js @@ -1 +1 @@ -define(["jquery"],function(a){return{init:function(){var b=!1,c=function(){b=!0},d=function(){var a=b;return b=!1,a};a('[data-toggle="dropdown"]').keydown(function(b){var d,e=b.which||b.keyCode;38==e&&c(),27==e&&(d=a(b.target).attr("aria-expanded"),b.preventDefault(),"false"==d&&a(b.target).click()),32!=e&&13!=e||(b.preventDefault(),a(b.target).click())});var e=function(b){var c=function(){a(this).focus()}.bind(b);setTimeout(c,50)};a(".dropdown").on("shown.bs.dropdown",function(b){var c=a(b.target).find('[role="menu"]'),f=!1,g=!1;c&&(f=a(c).find('[role="menuitem"]')),f&&f.length>0&&(g=d()?f[f.length-1]:f[0]),g&&e(g)}),a('.dropdown [role="menu"] [role="menuitem"]').keypress(function(b){var c,d,f=String.fromCharCode(b.which||b.keyCode),g=a(b.target).closest('[role="menu"]'),h=0,i=!1;if(g&&(i=a(g).find('[role="menuitem"]')))for(f=f.toLowerCase(),h=0;h0&&(g=d()?f[f.length-1]:f[0]),g&&e(g)}),a('.dropdown [role="menu"] [role="menuitem"]').keypress(function(b){var c,d,f=String.fromCharCode(b.which||b.keyCode),g=a(b.target).closest('[role="menu"]'),h=0,i=!1;if(g&&(i=a(g).find('[role="menuitem"]')))for(f=f.toLowerCase(),h=0;h0&&(a(b[0]).attr("tabindex","0"),a(b[0]).focus())},300)})}}}); \ No newline at end of file diff --git a/theme/boost/amd/src/aria.js b/theme/boost/amd/src/aria.js index 0f38c4a990b..aacfba2e5d4 100644 --- a/theme/boost/amd/src/aria.js +++ b/theme/boost/amd/src/aria.js @@ -183,6 +183,17 @@ define(['jquery'], function($) { shiftFocus(trigger); } }); + + // After page load, focus on any element with special autofocus attribute. + $(function() { + window.setTimeout(function() { + var alerts = $('[role="alert"][data-aria-autofocus="true"]'); + if (alerts.length > 0) { + $(alerts[0]).attr('tabindex', '0'); + $(alerts[0]).focus(); + } + }, 300); + }); } }; }); diff --git a/theme/boost/templates/core/auth_verify_age_location_page.mustache b/theme/boost/templates/core/auth_verify_age_location_page.mustache index 5f5fa057ef7..c462587472b 100644 --- a/theme/boost/templates/core/auth_verify_age_location_page.mustache +++ b/theme/boost/templates/core/auth_verify_age_location_page.mustache @@ -40,7 +40,7 @@
{{#error}} -