Accessibility fixes

pull/1/head
David Benqué 4 years ago
parent e671cf88d5
commit ac153690f9

@ -18,11 +18,11 @@ define([
var selected = Msg._languageUsed; var selected = Msg._languageUsed;
var keys = Object.keys(languages).sort(); var keys = Object.keys(languages).sort();
keys.forEach(function (l) { keys.forEach(function (l) {
var attr = { value: l}; var attr = { value: l, role: 'option'};
if (selected === l) { attr.selected = 'selected'; } if (selected === l) { attr.selected = 'selected'; }
options.push(h('option', attr, languages[l])); options.push(h('option', attr, languages[l]));
}); });
var select = h('select', {role: 'listbox', 'aria-label': 'language'}, options); var select = h('select', {role: 'listbox', 'label': 'language'}, options);
$(select).change(function () { $(select).change(function () {
Language.setLanguage($(select).val() || '', null, function () { Language.setLanguage($(select).val() || '', null, function () {
window.location.reload(); window.location.reload();

@ -59,7 +59,7 @@ define([
return h('a', [ return h('a', [
attr, attr,
h(s, [ h(s, [
h('i.' + font + '.' + icon), h('i.' + font + '.' + icon, {'aria-hidden': 'true'}),
h('div.pad-button-text', [ x[1] ]) h('div.pad-button-text', [ x[1] ])
]) ])
]); ]);
@ -127,7 +127,8 @@ define([
h('div.col-sm-6', h('div.col-sm-6',
h('img.img-fluid', { h('img.img-fluid', {
src:'/customize/images/shredder.png', src:'/customize/images/shredder.png',
alt:'illustration, a shredder destroys a sheet of paper and antoher one reconstructs it' alt:'',
'aria-hidden': 'true'
}) })
), ),
h('div.col-sm-6', [ h('div.col-sm-6', [
@ -165,7 +166,11 @@ define([
h('div.container.cp-container', [ h('div.container.cp-container', [
h('div.row.cp-home-hero', [ h('div.row.cp-home-hero', [
h('div.cp-title.col-md-7', [ h('div.cp-title.col-md-7', [
h('img', { src: '/customize/CryptPad_logo.svg?' + urlArgs }), h('img', {
src: '/customize/CryptPad_logo.svg?' + urlArgs,
'aria-hidden': 'true',
alt: ''
}),
h('h1', 'CryptPad'), h('h1', 'CryptPad'),
UI.setHTML(h('span.tag-line'), Msg.main_catch_phrase) UI.setHTML(h('span.tag-line'), Msg.main_catch_phrase)
]), ]),

@ -34,7 +34,9 @@ define([
]), ]),
h('div.col-md-6', [ h('div.col-md-6', [
h('img', { h('img', {
src: '/customize/images/collaboration.png?' + urlArgs src: '/customize/images/collaboration.png?' + urlArgs,
alt: '',
'aria-hidden': 'true'
}), }),
]), ]),
]), ]),
@ -45,7 +47,9 @@ define([
]), ]),
h('div.col-md-6.order-md-1', [ h('div.col-md-6.order-md-1', [
h('img', { h('img', {
src: '/customize/images/apps-preview.png?' + urlArgs src: '/customize/images/apps-preview.png?' + urlArgs,
alt: '',
'aria-hidden': 'true'
}), }),
]), ]),
]), ]),
@ -56,7 +60,9 @@ define([
]), ]),
h('div.col-md-6', [ h('div.col-md-6', [
h('img.cp-shadow', { h('img.cp-shadow', {
src: '/customize/images/drive-grid.png?' + urlArgs src: '/customize/images/drive-grid.png?' + urlArgs,
alt: '',
'aria-hidden': 'true'
}), }),
]), ]),
]), ]),
@ -71,16 +77,20 @@ define([
]), ]),
h('div.col-md-6.order-md-1.small-logos', [ h('div.col-md-6.order-md-1.small-logos', [
h('img', { h('img', {
src: '/customize/images/logo_ngi.png?' + urlArgs src: '/customize/images/logo_ngi.png?' + urlArgs,
alt: 'Logo NGI Trust'
}), }),
h('img', { h('img', {
src: '/customize/images/logo_nlnet.svg?' + urlArgs src: '/customize/images/logo_nlnet.svg?' + urlArgs,
alt: 'Logo NLNet Foundation'
}), }),
h('img', { h('img', {
src: '/customize/images/logo_bpifrance.svg?' + urlArgs src: '/customize/images/logo_bpifrance.svg?' + urlArgs,
alt: 'Logo BPI France'
}), }),
h('img', { h('img', {
src: '/customize/images/logo_moss.jpg?' + urlArgs src: '/customize/images/logo_moss.jpg?' + urlArgs,
alt: 'Logo Mozilla Open Source Support'
}), }),
]), ]),
]), ]),
@ -91,7 +101,8 @@ define([
]), ]),
h('div.col-md-6.small-logos', [ h('div.col-md-6.small-logos', [
h('img', { h('img', {
src: '/customize/images/logo_XWiki.svg?' + urlArgs src: '/customize/images/logo_XWiki.svg?' + urlArgs,
alt: 'Logo XWiki'
}), }),
]), ]),
]), ]),

@ -84,8 +84,8 @@ body {
padding: 10px 20px; padding: 10px 20px;
border-radius: 0px; border-radius: 0px;
cursor: pointer; cursor: pointer;
&:hover { &:hover, &:focus {
background-color: lighten(@colortheme_logo-2, 3%); background-color: darken(@colortheme_logo-2, 5%);
} }
} }
button.cp-secondary { button.cp-secondary {

Loading…
Cancel
Save