Browse Source

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

Add label and switch ocdialog close button to button element
tags/v27.0.0beta1
Pytal 1 year ago
parent
commit
24d4fa9d2e
No account linked to committer's email address

+ 4
- 2
core/src/jquery/css/jquery.ocdialog.scss View File

@@ -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;

+ 2
- 1
core/src/jquery/ocdialog.js View File

@@ -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)) {

+ 2
- 2
dist/core-main.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/core-main.js.map
File diff suppressed because it is too large
View File


Loading…
Cancel
Save