Skip to content

Commit

Permalink
using the bootstrap sr-only class instead of a custom one for the scr…
Browse files Browse the repository at this point in the history
…een reader labels and translating the strings, fixes #500
  • Loading branch information
henriyli committed Jun 6, 2016
1 parent 874b76b commit 49217ff
Show file tree
Hide file tree
Showing 11 changed files with 658 additions and 622 deletions.
9 changes: 0 additions & 9 deletions resource/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1615,15 +1615,6 @@ p.autocomplete-label {
font-weight: bold;
}

.screen-reader-label {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;
}

/* Fix for a nasty chromium bug causing the fonts not to render before a redraw.
* https://code.google.com/p/chromium/issues/detail?id=336476
************************************/
Expand Down
Binary file modified resource/translations/en/LC_MESSAGES/skosmos.mo
Binary file not shown.
Binary file modified resource/translations/fi/LC_MESSAGES/skosmos.mo
Binary file not shown.
Binary file modified resource/translations/skosmos_en.mo
Binary file not shown.
419 changes: 218 additions & 201 deletions resource/translations/skosmos_en.po

Large diffs are not rendered by default.

Binary file modified resource/translations/skosmos_fi.mo
Binary file not shown.
422 changes: 218 additions & 204 deletions resource/translations/skosmos_fi.po

Large diffs are not rendered by default.

Binary file modified resource/translations/skosmos_sv.mo
Binary file not shown.
422 changes: 218 additions & 204 deletions resource/translations/skosmos_sv.po

Large diffs are not rendered by default.

Binary file modified resource/translations/sv/LC_MESSAGES/skosmos.mo
Binary file not shown.
8 changes: 4 additions & 4 deletions view/headerbar.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{% if request.page != '' %}<div class="search-vocab-text"><p>{% trans "Content language" %}</p></div>{% endif %}
{% if sorted_vocabs is defined %}
<label class="screen-reader-label" for="multiselect">Search from vocabulary</label>
<label class="sr-only" for="multiselect">{% trans "Search from vocabulary" %}</label>
<select class="multiselect" id="multiselect" multiple="multiple">
{% for vocab in sorted_vocabs %}
<option value="{{ vocab.id }}" data-voc-shortname="{{ vocab.shortname }}" data-label="{{ vocab.title }}" title="{{ vocab.title }}">{{ vocab.shortname }}</option>
Expand All @@ -19,7 +19,7 @@
<input style="display: none" name="clang" value="{% if request.contentLang %}{{ request.contentLang }}{% else %}{{ request.lang }}{% endif %}" id="lang-input">
<div class="input-group">
<div class="input-group-btn">
<label class="screen-reader-label" for="lang-dropdown-toggle">Content and search language</label>
<label class="sr-only" for="lang-dropdown-toggle">{% trans "Content and search language" %}</label>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="lang-dropdown-toggle">{{ request.lang | lang_name(request.lang) }}</button>
<ul class="dropdown-menu">
{% if request.vocab %}
Expand All @@ -34,10 +34,10 @@
<li><a href="{% if not request.vocab %}{{ request.lang }}/{% endif %}{% if request.vocabid %}{{ request.vocabid }}/{{ request.lang }}/{% endif %}{% if request.page and request.page != 'vocab' %}{{ request.page }}/{% endif%}?{% if request.uri %}uri={{ request.uri }}&{% endif %}clang={% if request.contentLang %}{{ request.contentLang }}{% else %}{{ request.lang }}{% endif %}&anylang=on{% if term %}&q={{ term }}{% endif %}{% if vocabs %}&vocabs={{ vocabs }}{% endif %}" class="lang-button lang-button-all">{% trans "Search language: any" %}</a><input name="anylang" type="checkbox"{% if request.queryparam('anylang') %} checked{% endif%}></li>
</ul>
</div><!-- /btn-group -->
<label class="screen-reader-label" for="search-field">Enter search term</label>
<label class="sr-only" for="search-field">{% trans "Enter search term" %}</label>
<input id="search-field" type="text" class="form-control" name="q" value="{{ term }}" title="queryterm">
<div class="input-group-btn">
<label class="screen-reader-label" for="search-all-button">Submit search</label>
<label class="sr-only" for="search-all-button">{% trans "Submit search" %}</label>
<button id="search-all-button" type="submit" class="btn btn-primary">{% trans "Search" %}</button>
</div>
</div>
Expand Down

0 comments on commit 49217ff

Please sign in to comment.