a11y & SEO: fix source files - aria-labels, focus management, canonical, WebApplication schema, focus-visible
This commit is contained in:
parent
17c1f00e2b
commit
9095175141
4 changed files with 23 additions and 12 deletions
|
|
@ -25,6 +25,7 @@ function openSignup() {
|
|||
document.getElementById('signupEmail').value = '';
|
||||
document.getElementById('verifyCode').value = '';
|
||||
signupEmail = '';
|
||||
setTimeout(function() { document.getElementById('signupEmail').focus(); }, 100);
|
||||
}
|
||||
|
||||
function closeSignup() {
|
||||
|
|
@ -42,6 +43,7 @@ function openRecover() {
|
|||
document.getElementById('recoverEmailInput').value = '';
|
||||
document.getElementById('recoverCode').value = '';
|
||||
recoverEmail = '';
|
||||
setTimeout(function() { document.getElementById('recoverEmailInput').focus(); }, 100);
|
||||
}
|
||||
|
||||
function closeRecover() {
|
||||
|
|
@ -125,6 +127,8 @@ async function submitVerify() {
|
|||
|
||||
document.getElementById('apiKeyText').textContent = data.apiKey;
|
||||
showState('signupResult');
|
||||
var resultH2 = document.querySelector('#signupResult h2');
|
||||
if (resultH2) { resultH2.setAttribute('tabindex', '-1'); resultH2.focus(); }
|
||||
} catch (err) {
|
||||
errEl.textContent = 'Network error. Please try again.';
|
||||
errEl.style.display = 'block';
|
||||
|
|
@ -210,6 +214,8 @@ async function submitRecoverVerify() {
|
|||
if (data.apiKey) {
|
||||
document.getElementById('recoveredKeyText').textContent = data.apiKey;
|
||||
showRecoverState('recoverResult');
|
||||
var rH2 = document.querySelector('#recoverResult h2');
|
||||
if (rH2) { rH2.setAttribute('tabindex', '-1'); rH2.focus(); }
|
||||
} else {
|
||||
errEl.textContent = data.message || 'No key found for this email.';
|
||||
errEl.style.display = 'block';
|
||||
|
|
@ -457,6 +463,8 @@ async function submitEmailChangeVerify() {
|
|||
|
||||
document.getElementById('emailChangeNewDisplay').textContent = data.newEmail || emailChangeNewEmail;
|
||||
showEmailChangeState('emailChangeResult');
|
||||
var ecH2 = document.querySelector('#emailChangeResult h2');
|
||||
if (ecH2) { ecH2.setAttribute('tabindex', '-1'); ecH2.focus(); }
|
||||
} catch (err) {
|
||||
errEl.textContent = 'Network error. Please try again.';
|
||||
errEl.style.display = 'block';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue