Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/files/js/fileactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -378,6 +379,7 @@
menu.$el.on('afterHide', function() {
context.$file.removeClass('mouseOver');
$trigger.removeClass('open');
$trigger.attr('aria-expanded', 'false');
menu.remove();
});

Expand All @@ -404,6 +406,7 @@
}, false, context);

$el.addClass('permanent');
$el.attr('aria-expanded', 'false');

},

Expand Down
3 changes: 2 additions & 1 deletion apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand All @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions apps/files/js/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down
2 changes: 1 addition & 1 deletion apps/files/js/newfilemenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
*/
showAt: function($target) {
this.render();
OC.showMenu(null, this.$el);
OC.showMenu($target, this.$el);
}
});

Expand Down
2 changes: 1 addition & 1 deletion apps/files/templates/appnavigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class="nav-icon-<?php p(isset($item['icon']) && $item['icon'] !== '' ? $item['ic
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>
Expand Down
1 change: 1 addition & 0 deletions apps/settings/js/federationsettingsview.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
self._onScopeChanged(field, scope);
});
$icon.append(scopeMenu.$el);
$icon.attr('aria-expanded', 'false');
$icon.on('click', _.bind(scopeMenu.show, scopeMenu));
$icon.on('keydown', function(e) {
if (e.keyCode === 32) {
Expand Down
7 changes: 7 additions & 0 deletions apps/systemtags/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
this.collection.fetch({
success: function() {
$('#systemtag').select2(_.extend(self.select2));
$('#systemtag').parent().children('.select2-container').attr('aria-expanded', 'false')
}
});

Expand All @@ -50,6 +51,12 @@
$('#systemtag_submit').on('click', _.bind(this._onClickSubmit, this));
$('#systemtag_delete').on('click', _.bind(this._onClickDelete, this));
$('#systemtag_reset').on('click', _.bind(this._onClickReset, this));
$('#systemtag').select2(_.extend(self.select2)).on('select2-open', () => {
$('.select2-container').attr('aria-expanded', 'true')
});
$('#systemtag').select2(_.extend(self.select2)).on('select2-close', () => {
$('.select2-container').attr('aria-expanded', 'false')
});
},

/**
Expand Down
7 changes: 7 additions & 0 deletions apps/systemtags/src/systemtagsfilelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@
return t('systemtags', 'No tags found')
},
})
this.$filterField.parent().children('.select2-container').attr('aria-expanded', 'false')
this.$filterField.on('select2-open', () => {
this.$filterField.parent().children('.select2-container').attr('aria-expanded', 'true')
})
this.$filterField.on('select2-close', () => {
this.$filterField.parent().children('.select2-container').attr('aria-expanded', 'false')
})
this.$filterField.on(
'change',
_.bind(this._onTagsChanged, this)
Expand Down
2 changes: 2 additions & 0 deletions apps/theming/js/3rdparty/jscolor/jscolor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1354,13 +1354,15 @@ var jsc = {


function detachPicker () {
THIS.targetElement.setAttribute('aria-expanded', 'false');
jsc.unsetClass(THIS.targetElement, THIS.activeClass);
jsc.picker.wrap.parentNode.removeChild(jsc.picker.wrap);
delete jsc.picker.owner;
}


function drawPicker () {
THIS.targetElement.setAttribute('aria-expanded', 'true');

// At this point, when drawing the picker, we know what the parent elements are
// and we can do all related DOM operations, such as registering events on them
Expand Down
1 change: 1 addition & 0 deletions apps/theming/js/settings-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ window.addEventListener('DOMContentLoaded', function () {

// manually instantiate jscolor to work around new Function call which violates strict CSP
var colorElement = $('#theming-color')[0];
colorElement.setAttribute('aria-expanded', 'false');
var jscolor = new window.jscolor(colorElement, {hash: true});

$('#theming .theme-undo').each(function() {
Expand Down
3 changes: 3 additions & 0 deletions core/src/OC/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ export const hideMenus = function(complete) {

// Set menu to closed
$('.menutoggle').attr('aria-expanded', false)
if (currentMenuToggle) {
currentMenuToggle.attr('aria-expanded', false)
}

$('.openedMenu').removeClass('openedMenu')
currentMenu = null
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/HeaderMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
href="#"
:aria-label="ariaLabel"
:aria-controls="`header-menu-${id}`"
:aria-expanded="opened"
:aria-expanded="opened.toString()"
aria-haspopup="menu"
@click.prevent="toggleMenu">
<slot name="trigger" />
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.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.