diff options
author | Christopher Ng <chrng8@gmail.com> | 2023-03-06 11:09:44 -0800 |
---|---|---|
committer | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2023-03-09 09:09:24 +0100 |
commit | 04467032021fa59dc204659ab3367f622991cb9d (patch) | |
tree | 384265bbb9edf6884b794abb6e346ab7ca252782 /core | |
parent | b9c4112f47a2fc3f4db6bbb71846b4a2eb25c50e (diff) | |
download | nextcloud-server-04467032021fa59dc204659ab3367f622991cb9d.tar.gz nextcloud-server-04467032021fa59dc204659ab3367f622991cb9d.zip |
Add label and switch ocdialog close button to button element
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/src/jquery/css/jquery.ocdialog.scss | 6 | ||||
-rw-r--r-- | core/src/jquery/ocdialog.js | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/core/src/jquery/css/jquery.ocdialog.scss b/core/src/jquery/css/jquery.ocdialog.scss index 8755e1d7a74..1911dd29dc4 100644 --- a/core/src/jquery/css/jquery.ocdialog.scss +++ b/core/src/jquery/css/jquery.ocdialog.scss @@ -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; diff --git a/core/src/jquery/ocdialog.js b/core/src/jquery/ocdialog.js index c8ea065d3c0..9ba54d868c3 100644 --- a/core/src/jquery/ocdialog.js +++ b/core/src/jquery/ocdialog.js @@ -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)) { |