diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-08-29 22:40:49 +0200 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2022-08-29 22:46:48 +0200 |
commit | cc53efe4dd8c962a0900582c1e919a8f8182c183 (patch) | |
tree | 1f26e6051742c3f2eb6caafc94cfba1abbcb89c3 /apps/files/js | |
parent | aa150b9f85a2543fdbac8e73b5e6f8bb39f125f4 (diff) | |
download | nextcloud-server-cc53efe4dd8c962a0900582c1e919a8f8182c183.tar.gz nextcloud-server-cc53efe4dd8c962a0900582c1e919a8f8182c183.zip |
Add a11y attributes for legacy app navigation
Aded "role=navigation"
Added "aria-current=page" for the currently selected item.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/navigation.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/js/navigation.js b/apps/files/js/navigation.js index 8a2cddb3f52..d7ae7dd7fee 100644 --- a/apps/files/js/navigation.js +++ b/apps/files/js/navigation.js @@ -141,13 +141,13 @@ } return; } - this.$el.find('li a').removeClass('active'); + this.$el.find('li a').removeClass('active').removeAttr('aria-current'); if (this.$currentContent) { this.$currentContent.addClass('hidden'); this.$currentContent.trigger(jQuery.Event('hide')); } this._activeItem = itemId; - currentItem.children('a').addClass('active'); + currentItem.children('a').addClass('active').attr('aria-current', 'page'); this.$currentContent = $('#app-content-' + (typeof itemView === 'string' && itemView !== '' ? itemView : itemId)); this.$currentContent.removeClass('hidden'); if (!options || !options.silent) { |