Merge pull request #36772 from nextcloud/enh/a11y-ocdialog-close

Add label and switch ocdialog close button to button element
pull/37069/head
Pytal 1 year ago committed by GitHub
commit 24d4fa9d2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
Loading…
Cancel
Save