mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
add aria-label to notification content
+ fix notification outline
This commit is contained in:
parent
29f6706a50
commit
5cfe9dc363
@ -100,7 +100,7 @@ define([
|
||||
avatar = h('span.cp-avatar-image', h('img', { src:'/customize/CryptPad_logo.svg' }));
|
||||
}
|
||||
var order = -Math.floor((Util.find(data, ['content', 'msg', 'ctime']) || 0) / 1000);
|
||||
const tabIndexValue = data.content.isClickable ? '0': 'undefined';
|
||||
const tabIndexValue = 0; //data.content.isClickable ? '0': 'undefined';
|
||||
notif = h('li.cp-notification', {
|
||||
role: 'menuitem',
|
||||
tabindex: '0',
|
||||
@ -128,6 +128,7 @@ define([
|
||||
$(notif).find('.cp-notification-content p').html(data.content.getFormatText());
|
||||
}, 60000);
|
||||
}
|
||||
$(notif).find('.cp-notification-content').attr('aria-label', data.content.getFormatText().replace(/<[^>]*>/g, '')); // removes html tags from the text
|
||||
}
|
||||
|
||||
$(notif).mouseenter((e) => {
|
||||
|
||||
@ -125,6 +125,10 @@
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin: 0.1rem;
|
||||
&:focus-visible {
|
||||
outline: @variables_focus_style;
|
||||
border-radius: @variables_radius;
|
||||
}
|
||||
p {
|
||||
display: inline-block;
|
||||
margin: 1rem 1rem;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user