Add some accessibility titles to unclear page elements

This commit is contained in:
Andrew Nesbitt 2018-08-17 11:54:17 +01:00
Родитель 749dbf0a4d
Коммит 41a99714ab
3 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -22,7 +22,7 @@
<% filters.except(:q).select{|n,v| v.present? }.each do |name, value| %>
<%= hidden_field_tag name, value %>
<% end %>
<%= text_field_tag 'q', params[:q], placeholder: 'Search...', class: 'form-control', size: 46, id: 'search-box' %>
<%= text_field_tag 'q', params[:q], placeholder: 'Search...', class: 'form-control', size: 46, id: 'search-box', 'aria-label' => 'Search' %>
<div class="btn btn-sm btn-link search-help d-none d-md-block" title='Search Cheat Sheet' data-toggle="modal" data-target="#search-help">
<%= octicon 'question', :height => 16 %>
</div>
@ -31,7 +31,9 @@
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item nav-link d-none d-md-block">
<a href="https://opencollective.com/octobox/" class='opencollective' target='_blank'><%= octicon 'gift', height: 16, data: {toggle: "tooltip", placement: "bottom"}, title: 'Support Octobox on OpenCollective' %></a>
<a href="https://opencollective.com/octobox/" class='opencollective' target='_blank' aria-label='Support Octobox on OpenCollective'>
<%= octicon 'gift', height: 16, data: {toggle: "tooltip", placement: "bottom"}, title: 'Support Octobox on OpenCollective' %>
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle d-none d-md-block" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

Просмотреть файл

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title>Octobox</title>
<%= csrf_meta_tags %>
@ -7,6 +7,7 @@
<%= render 'layouts/favicons' %>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="turbolinks-cache-control" content="no-preview">
<meta name="Description" content="The best way to manage your GitHub Notifications">
<% if Rails.env.production? && Rails.application.secrets.google_analytics_id.present? %>
<script>

Просмотреть файл

@ -24,16 +24,16 @@
<div class="btn btn-sm btn-link help float-right d-none d-md-inline-block" data-toggle="modal" data-target="#help-box">
<%= octicon 'keyboard', :height => 16 %>
</div>
<button type="button" class="d-inline-block d-lg-none btn btn-sm btn-outline-dark" data-toggle="offcanvas">
<button type="button" class="d-inline-block d-lg-none btn btn-sm btn-outline-dark" data-toggle="offcanvas" aria-label='Toggle sidebar'>
<%= octicon 'three-bars', :height => 16 %>
</button>
<% if @notifications.to_a.any? %>
<label class="btn btn-outline-light select-all mb-0" for="select_all">
<input id="select_all" type="checkbox" class='js-select_all'>
<input id="select_all" type="checkbox" class='js-select_all' aria-label='Select All'>
</label>
<%= select_all_button(@cur_selected, @total) %>
<% end %>
<%= link_to sync_notifications_path(filters), class: 'btn btn-sm btn-outline-secondary sync', 'data-toggle' => 'tooltip', 'data-placement' => 'bottom', 'data-turbolinks' => false, 'data-animation' => 'false', 'data-position' => 'bottom', 'title' => 'Refresh list', method: :post do %>
<%= link_to sync_notifications_path(filters), class: 'btn btn-sm btn-outline-secondary sync', 'data-toggle' => 'tooltip', 'data-placement' => 'bottom', 'data-turbolinks' => false, 'data-animation' => 'false', 'data-position' => 'bottom', 'title' => 'Sync', 'aria-label' => 'Sync', method: :post do %>
<%= octicon 'sync', height: 16, class: "#{'spinning' if initial_sync?}" %>
<% end %>
<%= archive_selected_button unless archive_selected? %>