Add an aria-label for each trplaceholder (#2577)

This commit is contained in:
Yadd 2022-02-01 17:20:17 +01:00
parent fa703b54f9
commit 45ba9cb89d
4 changed files with 9 additions and 4 deletions

View File

@ -47,7 +47,9 @@ translatePage = (lang) ->
if msg.match /_hide_/
$(this).parent().hide()
$("[trplaceholder]").each ->
$(this).attr 'placeholder', translate($(this).attr('trplaceholder'))
tmp = translate($(this).attr('trplaceholder'))
$(this).attr 'placeholder', tmp
$(this).attr 'aria-label', tmp
$("[localtime]").each ->
d = new Date $(this).attr('localtime') * 1000
$(this).text d.toLocaleString()

View File

@ -61,7 +61,10 @@ LemonLDAP::NG Portal jQuery scripts
}
});
$("[trplaceholder]").each(function() {
return $(this).attr('placeholder', translate($(this).attr('trplaceholder')));
var tmp;
tmp = translate($(this).attr('trplaceholder'));
$(this).attr('placeholder', tmp);
return $(this).attr('aria-label', tmp);
});
return $("[localtime]").each(function() {
var d;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long