Add label and switch ocdialog close button to button element

Signed-off-by: Christopher Ng <chrng8@gmail.com>
pull/36772/head
Christopher Ng 2023-03-06 11:09:44 +07:00
parent 394ad988c7
commit 864fb3fe63
4 changed files with 9 additions and 6 deletions

@ -50,8 +50,10 @@
.oc-dialog-close {
position: absolute;
top: 0;
right: 0;
width: 44px !important;
height: 44px !important;
top: 4px;
right: 4px;
padding: 25px;
background: var(--icon-close-dark) no-repeat center;
opacity: .5;

@ -177,7 +177,8 @@ $.widget('oc.ocdialog', {
break
case 'closeButton':
if (value) {
const $closeButton = $('<a class="oc-dialog-close" tabindex="0"></a>')
const $closeButton = $('<button class="oc-dialog-close"></button>')
$closeButton.attr('aria-label', t('core', 'Close "{dialogTitle}" dialog', { dialogTitle: this.$title || this.options.title }))
this.$dialog.prepend($closeButton)
$closeButton.on('click keydown', function(event) {
if (isA11yActivation(event)) {

4
dist/core-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long