Skip to content

Commit

Permalink
Merge pull request #33079 from nextcloud/enh/a11y-file-picker-labels
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Jul 1, 2022
2 parents e5497d2 + 7219847 commit b0ee927
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
8 changes: 8 additions & 0 deletions core/src/OC/dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
},
Expand All @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion core/templates/filepicker.html
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
4 changes: 2 additions & 2 deletions dist/core-login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-login.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-main.js.map

Large diffs are not rendered by default.

0 comments on commit b0ee927

Please sign in to comment.