Commit 906d704c by cahrens

Fix a11y issues.

TNL-6440, TNL-6439
parent f57db71c
...@@ -29,7 +29,7 @@ package_data = dict( ...@@ -29,7 +29,7 @@ package_data = dict(
setup( setup(
name = "django-wiki", name = "django-wiki",
version = "0.0.9", version = "0.0.10",
author = "Benjamin Bach", author = "Benjamin Bach",
author_email = "benjamin@overtag.dk", author_email = "benjamin@overtag.dk",
description = ("A wiki system written for the Django framework."), description = ("A wiki system written for the Django framework."),
......
...@@ -362,5 +362,4 @@ class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm): ...@@ -362,5 +362,4 @@ class PermissionsForm(PluginSettingsFormMixin, forms.ModelForm):
class DirFilterForm(forms.Form): class DirFilterForm(forms.Form):
query = forms.CharField(widget=forms.TextInput(attrs={'placeholder': _(u'Filter...'), query = forms.CharField(label=_(u'Filter'), widget=forms.TextInput(attrs={'class': 'search-query'}))
'class': 'search-query'}))
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
{% trans "Add article" %} {% trans "Add article" %}
</a> </a>
</div> </div>
<div class="pull-right"> <div class="pull-right input-prepend">
{{ filter_form.query }} {{ filter_form.query.label_tag }} {{ filter_form.query }}
</div>
{% if filter_query %} {% if filter_query %}
<div class="pull-right filter-clear"> <div class="pull-right filter-clear">
<a href="{{ self_url }}">({% trans "clear" %})</a> <a href="{{ self_url }}">{% trans "clear" %}</a>
</div> </div>
{% endif %} {% endif %}
</div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
...@@ -37,17 +37,24 @@ ...@@ -37,17 +37,24 @@
<p> <p>
{% with paginator.object_list.count as cnt %} {% with paginator.object_list.count as cnt %}
{% blocktrans with urlpath.path as path and cnt|pluralize:_("article,articles") as articles_plur and cnt|pluralize:_("is,are") as articles_plur_verb %} {% if filter_query %}
Browsing <strong><a href="{{ self_url }}">/{{ path }}</a></strong>. There {{ articles_plur_verb }} <strong>{{ cnt }} {{ articles_plur }}</strong> in this level. {% blocktrans with cnt|pluralize:_("article,articles") as articles_plur and cnt|pluralize:_("matches,match") as match_plur %}
{{ cnt }} {{ articles_plur }} in this level {{ match_plur }} your search.
{% endblocktrans %}
{% else %}
{% blocktrans with cnt|pluralize:_("article,articles") as articles_plur and cnt|pluralize:_("is,are") as articles_plur_verb %}
There {{ articles_plur_verb }} {{ cnt }} {{ articles_plur }} in this level.
{% endblocktrans %} {% endblocktrans %}
{% endif %}
{% endwith %} {% endwith %}
</p> </p>
<table class="table table-striped"> {% if directory %}
<table class="table table-striped">
<tr> <tr>
<th>{% trans "Title" %}</th> <th scope="col">{% trans "Title" %}</th>
<th>{% trans "Slug" %}</th> <th scope="col">{% trans "Slug" %}</th>
<th>{% trans "Last modified" %}</th> <th scope="col">{% trans "Last modified" %}</th>
</tr> </tr>
{% for urlpath in directory %} {% for urlpath in directory %}
<tr> <tr>
...@@ -68,14 +75,9 @@ ...@@ -68,14 +75,9 @@
{{ urlpath.article.current_revision.created|naturaltime }} {{ urlpath.article.current_revision.created|naturaltime }}
</td> </td>
</tr> </tr>
{% empty%}
<tr>
<td colspan="100">
<em>{% trans "There are no articles in this level" %}</em>
</td>
</tr>
{% endfor %} {% endfor %}
</table> </table>
{% endif %}
{% include "wiki/includes/pagination.html" %} {% include "wiki/includes/pagination.html" %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment