mirror of
https://github.com/nextcloud/server.git
synced 2026-04-11 20:16:54 -04:00
Merge pull request #36772 from nextcloud/enh/a11y-ocdialog-close
Add label and switch ocdialog close button to button element
This commit is contained in:
commit
24d4fa9d2e
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;
|
||||
|
|
|
|||
3
core/src/jquery/ocdialog.js
vendored
3
core/src/jquery/ocdialog.js
vendored
|
|
@ -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
4
dist/core-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-main.js.map
vendored
2
dist/core-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue