diff --git a/app/controllers/concerns/paginable.rb b/app/controllers/concerns/paginable.rb index d07f4d4..0c58199 100644 --- a/app/controllers/concerns/paginable.rb +++ b/app/controllers/concerns/paginable.rb @@ -55,7 +55,7 @@ # Generates an HTML link to sort given a sort field. # sort_field {String} - Represents the column name for a table def paginable_sort_link(sort_field) - return link_to(sort_link_name(sort_field), sort_link_url(sort_field), 'data-remote': true, class: 'paginable-action') + return link_to(sort_link_name(sort_field), sort_link_url(sort_field), 'data-remote': true, class: 'paginable-action', "aria-label": "#{sort_field}") end # Determines whether or not the latest request included the search functionality def searchable? diff --git a/app/views/paginable/users/_index.html.erb b/app/views/paginable/users/_index.html.erb index af5a861..05f7c10 100644 --- a/app/views/paginable/users/_index.html.erb +++ b/app/views/paginable/users/_index.html.erb @@ -51,7 +51,7 @@ <% if is_super_admin %> <%= form_for user, url: activate_user_path(user), html: { method: :put, remote: true, class: 'activate-user' } do |f| %> - <%= check_box_tag(:active, "1", user.active) %> + <%= check_box_tag(:active, "1", user.active, "aria-label": "active" ) %> <%= f.submit(_('Update'), style: 'display: none;') %> <% end %> <% else %> diff --git a/app/views/plans/_download_form.html.erb b/app/views/plans/_download_form.html.erb index b6965e8..3dd0a91 100644 --- a/app/views/plans/_download_form.html.erb +++ b/app/views/plans/_download_form.html.erb @@ -30,7 +30,7 @@
<%= select_tag :format, options_for_select(ExportedPlan::VALID_FORMATS, :pdf), - class: 'form-control' %> + class: 'form-control', "aria-labelledby": "format" %>
diff --git a/app/views/plans/_edit_details.html.erb b/app/views/plans/_edit_details.html.erb index 02e60a5..ad25f68 100644 --- a/app/views/plans/_edit_details.html.erb +++ b/app/views/plans/_edit_details.html.erb @@ -10,7 +10,7 @@ title: _('If applying for funding, state the name exactly as in the grant proposal.')) %>
<%= f.hidden_field :visibility %> - <%= f.label(:is_test, raw("#{check_box_tag(:is_test,1, @plan.is_test?)} #{_('mock project for testing, practice, or educational purposes')}"), class: 'control-label') %> + <%= f.label(:is_test, raw("#{check_box_tag(:is_test,1, @plan.is_test? , "aria-label": "is_test")} #{_('mock project for testing, practice, or educational purposes')}"), class: 'control-label') %>
diff --git a/app/views/plans/_guidance_choices.html.erb b/app/views/plans/_guidance_choices.html.erb index bf00fb3..253a0f2 100644 --- a/app/views/plans/_guidance_choices.html.erb +++ b/app/views/plans/_guidance_choices.html.erb @@ -2,7 +2,7 @@ <% if groups && groups.size == 1 %>
  • <%= check_box_tag "guidance_group_ids[]", groups[0].id, - current_selections.include?(groups[0].id), class: 'guidance-choice' %> + current_selections.include?(groups[0].id), class: 'guidance-choice', "aria-label": "#{groups[0].id}" %> <%= org.name %>
  • <% elsif groups %> @@ -13,7 +13,7 @@
  • └─ <%= check_box_tag "guidance_group_ids[]", group.id, - current_selections.include?(group.id), class: 'guidance-choice' %> + current_selections.include?(group.id), class: 'guidance-choice', "aria-label": "#{group.id}" %> <%= group.name %>
  • <% end %> diff --git a/app/views/plans/new.html.erb b/app/views/plans/new.html.erb index 1b1b261..29aaac5 100644 --- a/app/views/plans/new.html.erb +++ b/app/views/plans/new.html.erb @@ -15,7 +15,7 @@

    <%= _('What research project are you planning?') %>

    - <%= f.text_field(:title, class: 'form-control', 'aria-describedby': 'project-title', 'aria-required': 'true', + <%= f.text_field(:title, class: 'form-control', 'aria-describedby': 'project-title', 'aria-required': 'true', 'aria-label': 'project-title', 'data-toggle': 'tooltip', title: _('If applying for funding, state the project title exactly as in the proposal.')) %>
    diff --git a/app/views/shared/_accessible_combobox.html.erb b/app/views/shared/_accessible_combobox.html.erb index af6653a..0a06f81 100644 --- a/app/views/shared/_accessible_combobox.html.erb +++ b/app/views/shared/_accessible_combobox.html.erb @@ -16,6 +16,7 @@ data-combobox-allow-suggestion-on-empty="true" data-toggle="<%= title == '' ? '' : 'tooltip' %>" title="<%= title %>" + aria-label= "<%= title %>", value="<%= default_selection[attribute] unless default_selection.nil? %>" /> <% models.each do |model| %> diff --git a/app/views/shared/_my_org.html.erb b/app/views/shared/_my_org.html.erb index 66b3415..89d1d87 100644 --- a/app/views/shared/_my_org.html.erb +++ b/app/views/shared/_my_org.html.erb @@ -13,7 +13,8 @@
    <%= f.text_field :other_organisation, autocomplete: "off", class: "form-control hide", - placeholder: _('Please enter the name of your organisation') %> + placeholder: _('Please enter the name of your organisation'), + "aria-label": "other_organisation" %>
    diff --git a/app/views/shared/_search.html.erb b/app/views/shared/_search.html.erb index 5efe38e..53f6967 100644 --- a/app/views/shared/_search.html.erb +++ b/app/views/shared/_search.html.erb @@ -5,7 +5,7 @@ - <%= text_field_tag(:search, search_term, class: 'form-control', 'aria-describedby': 'search-addon', 'aria-required': true) %> + <%= text_field_tag(:search, search_term, class: 'form-control', 'aria-labelledby': 'search', 'aria-describedby': 'search-addon', 'aria-required': true) %>
    <%= submit_tag(_('Search'), class: 'btn btn-default', style: 'margin-top: 8px;') %>