summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorjulia.kirschenheuter <julia.kirschenheuter@nextcloud.com>2022-08-04 08:45:57 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2022-08-17 19:28:40 +0000
commit6d12f8b8a146cf789f924b9c0de16ddd05a92ae4 (patch)
tree60f1505d4ca2c8bfbdc1649f1b87493f6ec190c5 /apps/files
parent2f538bb20f7859b2f09d0d088be9ee47c6cdadde (diff)
downloadnextcloud-server-6d12f8b8a146cf789f924b9c0de16ddd05a92ae4.tar.gz
nextcloud-server-6d12f8b8a146cf789f924b9c0de16ddd05a92ae4.zip
Add ```aria-expanded``` value to select2-container om systemtag and file tags
Add ```aria-expanded``` to color picker Add ```aria-expanded``` to UnifiedSearch.vue Add ```aria-expanded``` to new button on files Add ```aria-expanded``` to action menu Add ```aria-expanded``` to icon .federation-menu Add ```aria-expanded``` to app navigation collapse button Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/js/fileactions.js3
-rw-r--r--apps/files/js/filelist.js3
-rw-r--r--apps/files/js/navigation.js7
-rw-r--r--apps/files/js/newfilemenu.js2
-rw-r--r--apps/files/templates/appnavigation.php2
5 files changed, 14 insertions, 3 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 8790eae9c98..9b86c6521ae 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -370,6 +370,7 @@
var menu;
var $trigger = context.$file.closest('tr').find('.fileactions .action-menu');
$trigger.addClass('open');
+ $trigger.attr('aria-expanded', 'true');
menu = new OCA.Files.FileActionsMenu();
@@ -378,6 +379,7 @@
menu.$el.on('afterHide', function() {
context.$file.removeClass('mouseOver');
$trigger.removeClass('open');
+ $trigger.attr('aria-expanded', 'false');
menu.remove();
});
@@ -404,6 +406,7 @@
}, false, context);
$el.addClass('permanent');
+ $el.attr('aria-expanded', 'false');
},
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 4acefa6902b..8407cb79bb3 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -3853,7 +3853,7 @@
$actionsContainer.prepend($newButton);
$newButton.tooltip({'placement': 'bottom'});
-
+ $newButton.attr('aria-expanded', 'false');
$newButton.click(_.bind(this._onClickNewButton, this));
this._newButton = $newButton;
},
@@ -3864,6 +3864,7 @@
$target = $target.closest('.button');
}
this._newButton.tooltip('hide');
+ $target.attr('aria-expanded', 'true');
event.preventDefault();
if ($target.hasClass('disabled')) {
return false;
diff --git a/apps/files/js/navigation.js b/apps/files/js/navigation.js
index f8f15394ef0..8a2cddb3f52 100644
--- a/apps/files/js/navigation.js
+++ b/apps/files/js/navigation.js
@@ -200,6 +200,13 @@
if ($menu.hasClass('collapsible') && $menu.data('expandedstate')) {
$menu.toggleClass('open');
+ var targetAriaExpanded = $target.attr('aria-expanded');
+ if (targetAriaExpanded === 'false') {
+ $target.attr('aria-expanded', 'true');
+ } else if (targetAriaExpanded === 'true') {
+ $target.attr('aria-expanded', 'false');
+ }
+ $menu.toggleAttr('data-expanded', 'true', 'false');
var show = $menu.hasClass('open') ? 1 : 0;
var key = $menu.data('expandedstate');
$.post(OC.generateUrl("/apps/files/api/v1/toggleShowFolder/" + key), {show: show});
diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js
index faebc305c6d..67ca8934549 100644
--- a/apps/files/js/newfilemenu.js
+++ b/apps/files/js/newfilemenu.js
@@ -245,7 +245,7 @@
*/
showAt: function($target) {
this.render();
- OC.showMenu(null, this.$el);
+ OC.showMenu($target, this.$el);
}
});
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php
index 9ff680d6a8d..3c333d39fc0 100644
--- a/apps/files/templates/appnavigation.php
+++ b/apps/files/templates/appnavigation.php
@@ -90,7 +90,7 @@ function NavigationListElements($item, $l, $pinned) {
NavigationElementMenu($item);
if (isset($item['sublist'])) {
?>
- <button class="collapse app-navigation-noclose"
+ <button class="collapse app-navigation-noclose" aria-expanded="<?= !empty($item['defaultExpandedState']) ? 'true' : 'false' ?>"
aria-label="<?php p($l->t('Toggle %1$s sublist', $item['name'])) ?>"
<?php if (sizeof($item['sublist']) == 0) { ?> style="display: none" <?php } ?>>
</button>