summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-07-01 11:09:23 +0200
committerGitHub <noreply@github.com>2022-07-01 11:09:23 +0200
commitb0ee927ac1c5c7f921758b51c0c0fc2c0d70653a (patch)
tree42d7e6b4cc939f424b6de8098fe6eeb07ea0660d /core
parente5497d285be700e1f4953deb620cd3a5a1a2798b (diff)
parent7219847ad118375faeeddfff1da869fce4992e0e (diff)
downloadnextcloud-server-b0ee927ac1c5c7f921758b51c0c0fc2c0d70653a.tar.gz
nextcloud-server-b0ee927ac1c5c7f921758b51c0c0fc2c0d70653a.zip
Merge pull request #33079 from nextcloud/enh/a11y-file-picker-labels
Diffstat (limited to 'core')
-rw-r--r--core/src/OC/dialogs.js8
-rw-r--r--core/templates/filepicker.html2
2 files changed, 9 insertions, 1 deletions
diff --git a/core/src/OC/dialogs.js b/core/src/OC/dialogs.js
index 2ca4bbf73f9..e2996de8f12 100644
--- a/core/src/OC/dialogs.js
+++ b/core/src/OC/dialogs.js
@@ -1045,6 +1045,10 @@ const Dialogs = {
self.$showGridView
.removeClass('icon-toggle-filelist icon-toggle-pictures')
.addClass(response.gridview ? 'icon-toggle-filelist' : 'icon-toggle-pictures')
+ self.$showGridView.attr(
+ 'aria-label',
+ response.gridview ? t('files', 'Show list view') : t('files', 'Show grid view'),
+ )
$('.list-container').toggleClass('view-grid', response.gridview)
})
},
@@ -1057,6 +1061,10 @@ const Dialogs = {
this.$showGridView
.removeClass('icon-toggle-filelist icon-toggle-pictures')
.addClass(isGridView ? 'icon-toggle-pictures' : 'icon-toggle-filelist')
+ this.$showGridView.attr(
+ 'aria-label',
+ isGridView ? t('files', 'Show grid view') : t('files', 'Show list view'),
+ )
$('.list-container').toggleClass('view-grid', !isGridView)
},
_getFilePickerTemplate: function() {
diff --git a/core/templates/filepicker.html b/core/templates/filepicker.html
index 87cea74d9a2..c021387e805 100644
--- a/core/templates/filepicker.html
+++ b/core/templates/filepicker.html
@@ -1,6 +1,6 @@
<div id="{dialog_name}" title="{title}">
<span class="dirtree breadcrumb">
- <span class="actions creatable"><a href="#" class="icon icon-add button button-add"></a>
+ <span class="actions creatable"><a href="#" class="icon icon-add button button-add" aria-label="{newtext}"></a>
<nav class="menu popovermenu bubble menu-left newFolderMenu">
<ul><li>
<form class="filenameform">