Bläddra i källkod

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>
tags/v25.0.0beta2
julia.kirschenheuter 1 år sedan
förälder
incheckning
6d12f8b8a1

+ 3
- 0
apps/files/js/fileactions.js Visa fil

@@ -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');

},


+ 2
- 1
apps/files/js/filelist.js Visa fil

@@ -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;

+ 7
- 0
apps/files/js/navigation.js Visa fil

@@ -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});

+ 1
- 1
apps/files/js/newfilemenu.js Visa fil

@@ -245,7 +245,7 @@
*/
showAt: function($target) {
this.render();
OC.showMenu(null, this.$el);
OC.showMenu($target, this.$el);
}
});


+ 1
- 1
apps/files/templates/appnavigation.php Visa fil

@@ -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>

+ 1
- 0
apps/settings/js/federationsettingsview.js Visa fil

@@ -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) {

+ 7
- 0
apps/systemtags/js/admin.js Visa fil

@@ -38,6 +38,7 @@
this.collection.fetch({
success: function() {
$('#systemtag').select2(_.extend(self.select2));
$('#systemtag').parent().children('.select2-container').attr('aria-expanded', 'false')
}
});

@@ -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')
});
},

/**

+ 7
- 0
apps/systemtags/src/systemtagsfilelist.js Visa fil

@@ -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)

+ 2
- 0
apps/theming/js/3rdparty/jscolor/jscolor.js Visa fil

@@ -1354,6 +1354,7 @@ 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;
@@ -1361,6 +1362,7 @@ var jsc = {


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

+ 1
- 0
apps/theming/js/settings-admin.js Visa fil

@@ -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() {

+ 3
- 0
core/src/OC/menu.js Visa fil

@@ -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

+ 1
- 1
core/src/components/HeaderMenu.vue Visa fil

@@ -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" />

+ 2
- 2
dist/core-login.js
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 1
dist/core-login.js.map
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 2
- 2
dist/core-main.js
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 1
dist/core-main.js.map
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 2
- 2
dist/core-unified-search.js
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 1
dist/core-unified-search.js.map
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 2
- 2
dist/systemtags-systemtags.js
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 1
dist/systemtags-systemtags.js.map
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


Laddar…
Avbryt
Spara