diff --git a/customize.dist/pages.js b/customize.dist/pages.js index aff77eb74..c4e03beaa 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -77,6 +77,7 @@ define([ if (!ref) { return; } var attrs = { href: ref, + role: 'button', }; var iconName = ''; if (!/^\//.test(ref)) { @@ -155,7 +156,7 @@ define([ return h('footer.cp-footer', [ h('div.cp-footer-left', [ - h('a', {href:"https://cryptpad.org"}, [ + h('a', {href:"https://cryptpad.org", role: 'button'}, [ h('div.cp-logo-foot', [ h('img', { src: '/customize/CryptPad_logo.svg', @@ -188,7 +189,7 @@ define([ var registerLink; if (!ApiConfig.restrictRegistration) { - registerLink = h('a.nav-item.nav-link.cp-register-btn', { href: '/register/'}, [ + registerLink = h('a.nav-item.nav-link.cp-register-btn', { href: '/register/', role: 'button'}, [ h('i.fa.fa-user', {'aria-hidden':'true'}), Msg.login_register ]); @@ -196,14 +197,14 @@ define([ if (username === null) { rightLinks = [ - h('a.nav-item.nav-link.cp-login-btn', { href: '/login/'}, [ + h('a.nav-item.nav-link.cp-login-btn', { href: '/login/', role: 'button'}, [ h('i.fa.fa-sign-in', {'aria-hidden':'true'}), Msg.login_login ]), registerLink, ]; } else { - rightLinks = h('a.nav-item.nav-link.cp-user-btn', { href: '/drive/' }, [ + rightLinks = h('a.nav-item.nav-link.cp-user-btn', { href: '/drive/', role: 'button'}, [ h('i.fa.fa-user-circle', {'aria-hidden':'true'}), " ", username @@ -211,7 +212,7 @@ define([ } var isHome = ['/', '/index.html'].includes(window.location.pathname); - var homeLink = h('a.nav-item.nav-link.cp-back-home' /* .navbar-brand */, { href: '/index.html' }, [ + var homeLink = h('a.nav-item.nav-link.cp-back-home' /* .navbar-brand */, { href: '/index.html', role: 'button'}, [ h('i.fa.fa-arrow-left'), h('img', { src: '/customize/CryptPad_logo.svg', @@ -231,7 +232,7 @@ define([ return h('nav.navbar.navbar-expand-lg', [ !isHome? homeLink: undefined, - h('a.nav-item.nav-link', { href: '/features.html'}, [ + h('a.nav-item.nav-link', { href: '/features.html', role: 'button'}, [ h('i.fa.fa-info-circle'), pricingName ]), diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 211f75749..778692f84 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -212,6 +212,12 @@ define([ h('div'+cls, content), ]) ]); + + var dialogContent = frame.querySelector('div' + cls); + dialogContent.setAttribute('aria-live', 'assertive'); + dialogContent.setAttribute('role', 'alertdialog'); + dialogContent.setAttribute('aria-modal', 'true'); + var $frame = $(frame); frame.closeModal = function (cb) { frame.closeModal = function () {}; // Prevent further calls