accessibility fixes on admin panel support ticket buttons

This commit is contained in:
ansuz 2022-08-30 16:46:13 +05:30
parent 77062c2640
commit af59854aca
2 changed files with 15 additions and 6 deletions

View File

@ -109,6 +109,9 @@
align-items: top;
.cp-support-title-buttons {
flex-shrink: 0;
button i {
margin-right: 0px;
}
}
}
.cp-support-collapsed {

View File

@ -334,10 +334,13 @@ Messages.support_formCategoryError = "Please select a ticket category from the d
var publicKey = Util.find(content, ['sender', 'edPublic']);
if (ctx.isAdmin) {
ticketCategory = Messages['support_cat_'+(content.category || 'all')] + ' - ';
url = h('button.btn.fa.fa-link', {
url = h('button.btn', {
title: Messages.share_linkCopy,
// XXX other accessibility attributes?
});
}, [
h('i.fa.fa-link', {
'aria-hidden': true,
}),
]);
$(url).click(function (e) {
e.stopPropagation();
var link = privateData.origin + privateData.pathname + '#' + 'support-' + content.id;
@ -345,10 +348,13 @@ Messages.support_formCategoryError = "Please select a ticket category from the d
if (success) { UI.log(Messages.shareSuccess); }
});
if (typeof(publicKey) === 'string') {
copyKey = h('button.btn.fa.fa-key', {
copyKey = h('button.btn', {
title: Messages.profile_copyKey,
// XXX accessibility
});
}, [
h('i.fa.fa-key', {
'aria-hidden': true,
}),
]);
$(copyKey).click(e => {
e.stopPropagation();
if (Clipboard.copy(publicKey)) {