Add label and switch ocdialog close button to button elementtags/v27.0.0beta1
@@ -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)) { |