From cfc9a8ac2e80a0269f10aae4787b305277dc8a14 Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Fri, 18 May 2018 17:09:28 +0200 Subject: [PATCH] Fix multiple accessibility issues --- app/assets/javascripts/application.js.erb | 2 +- .../javascripts/specific/main_menu.js.erb | 1 + app/views/layouts/base.html.erb | 5 +++-- config/locales/js-en.yml | 1 + .../table-pagination.component.html | 18 ++++++++++++------ 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/application.js.erb b/app/assets/javascripts/application.js.erb index 1a1894e59c..0469b46d64 100644 --- a/app/assets/javascripts/application.js.erb +++ b/app/assets/javascripts/application.js.erb @@ -351,7 +351,7 @@ jQuery(document).ready(function($) { addClickEventToAllErrorMessages(); // Skip menu on content - jQuery('.skip-navigation-link').click(skipMenu); + jQuery('#skip-navigation--content').click(skipMenu); // Click handler for formatting help jQuery(document.body).on('click', '.formatting-help-link-button', function() { diff --git a/app/assets/javascripts/specific/main_menu.js.erb b/app/assets/javascripts/specific/main_menu.js.erb index 06f8c78611..8f7605fbfd 100644 --- a/app/assets/javascripts/specific/main_menu.js.erb +++ b/app/assets/javascripts/specific/main_menu.js.erb @@ -61,6 +61,7 @@ jQuery(document).ready(function($) { } return false; }); + toggler.attr('title', I18n.t('js.project_menu_details')); // wrap main items var mainItems = $('#main-menu li > a').not('ul ul a'); diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 5be7c8a04a..3af1d491fd 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -105,8 +105,9 @@ See docs/COPYRIGHT.rdoc for more details. - <%= I18n.t('js.work_packages.jump_marks.content') %> + id="skip-navigation--content" + aria-label="<%= I18n.t('js.work_packages.jump_marks.label_content') %>"> + <%= I18n.t('js.work_packages.jump_marks.content') %> <%= render_top_menu_left %>