Skip to content

Commit

Permalink
add in more link purpose for screen readers
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed committed Feb 27, 2015
1 parent 50acc87 commit 9adcac1
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/views/catalog/_facet_limit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<%= render_facet_limit_list paginator, field_name %>
<% unless paginator.last_page? || params[:action] == "facet" %>
<li class="more_facets_link"><%= link_to t('blacklight.search.facets.more'),
search_facet_url(id: field_name), class: "more_facets_link" %></li>
<li class="more_facets_link">
<%= link_to t("#{field_name}_html", scope: 'blacklight.search.facets', default: :more_html, field_name: facet_field.label),
search_facet_url(id: field_name), class: "more_facets_link" %>
</li>
<% end %>
</ul>
2 changes: 2 additions & 0 deletions config/locales/blacklight.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ de:
count: 'Numerisch ordnen'
index: 'A-Z Ordnen'
count: '%{number}'
# i18n key 'more' is deprecated and will be removed in Blacklight 6.0
more: 'mehr »'
more_html: 'mehr <span class="sr-only">%{field_name}</span> »'
selected:
remove: '[entfernen]'
group:
Expand Down
2 changes: 2 additions & 0 deletions config/locales/blacklight.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ en:
count: 'Numerical Sort'
index: 'A-Z Sort'
count: '%{number}'
# i18n key 'more' is deprecated and will be removed in Blacklight 6.0
more: 'more »'
more_html: 'more <span class="sr-only">%{field_name}</span> »'
selected:
remove: '[remove]'
group:
Expand Down
2 changes: 2 additions & 0 deletions config/locales/blacklight.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ es:
count: 'Ordenación numérica'
index: 'Ordenación A-Z'
count: '%{number}'
# i18n key 'more' is deprecated and will be removed in Blacklight 6.0
more: 'más »'
more_html: 'más <span class="sr-only">%{field_name}</span> »'
selected:
remove: '[borrar]'
group:
Expand Down
2 changes: 2 additions & 0 deletions config/locales/blacklight.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ fr:
count: 'Du + au - fréquent'
index: 'Tri de A à Z'
count: '%{number}'
# i18n key 'more' is deprecated and will be removed in Blacklight 6.0
more: 'plus »'
more_html: 'plus <span class="sr-only">%{field_name}</span> »'
selected:
remove: '[ X ]'
group:
Expand Down
2 changes: 2 additions & 0 deletions config/locales/blacklight.pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ pt-BR:
count: 'Ordenar por Número'
index: 'Ordem Alfabética A-Z'
count: '%{number}'
# i18n key 'more' is deprecated and will be removed in Blacklight 6.0
more: 'mais »'
more_html: 'mais <span class="sr-only">%{field_name}</span> »'
selected:
remove: '[remover]'
filters:
Expand Down
8 changes: 8 additions & 0 deletions spec/features/facets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,12 @@


end
describe '"More" links' do
it 'has default more link with sr-only text' do
visit root_path
within '#facet-language_facet' do
expect(page).to have_css 'li.more_facets_link', text: 'more'
end
end
end
end

0 comments on commit 9adcac1

Please sign in to comment.