Skip to content

Commit

Permalink
Accessibility standards require <th scope='row|col'> attributes.
Browse files Browse the repository at this point in the history
Thanks @tauberer for the patch
  • Loading branch information
amercader committed Feb 7, 2013
1 parent a19bd60 commit 6af04e7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
16 changes: 8 additions & 8 deletions ckan/templates/admin/authz.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
{% endfor %}
</colgroup>
<tr>
<th>{{ _('User') }}</th>
<th scope="col">{{ _('User') }}</th>
{% for role in roles %}
<th> {{ role }} </th>
<th scope="col"> {{ role }} </th>
{% endfor %}
</tr>
{% for user in users %}
Expand Down Expand Up @@ -49,9 +49,9 @@
{% endfor %}
</colgroup>
<tr>
<th>{{ _('User') }}</th>
<th scope="col">{{ _('User') }}</th>
{% for role in roles %}
<th> {{ role }} </th>
<th scope="col"> {{ role }} </th>
{% endfor %}
</tr>
<tr>
Expand All @@ -77,9 +77,9 @@
{% endfor %}
</colgroup>
<tr>
<th>{{ _('User Group') }}</th>
<th scope="col">{{ _('User Group') }}</th>
{% for role in roles %}
<th> {{ role }} </th>
<th scope="col"> {{ role }} </th>
{% endfor %}
</tr>
{% for user in users %}
Expand Down Expand Up @@ -112,9 +112,9 @@
{% endfor %}
</colgroup>
<tr>
<th>User Group</th>
<th scope="col">User Group</th>
{% for role in roles %}
<th> {{ role }} </th>
<th scope="col"> {{ role }} </th>
{% endfor %}
</tr>
<tr>
Expand Down
8 changes: 4 additions & 4 deletions ckan/templates/ajax_snippets/api_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ <h3>
<thead></thead>
<tbody>
<tr>
<th>Create</th>
<th scope="row">Create</th>
<td><code>{{ datastore_root_url }}/datastore_create</code></td>
</tr>
<tr>
<th>Update / Insert</th>
<th scope="row">Update / Insert</th>
<td><code>{{ datastore_root_url }}/datastore_upsert</code></td>
</tr>
<tr>
<th>Query</th>
<th scope="row">Query</th>
<td><code>{{ datastore_root_url }}/datastore_search</code></td>
</tr>
<tr>
<th>Query (via SQL)</th>
<th scope="row">Query (via SQL)</th>
<td><code>{{ datastore_root_url }}/datastore_search_sql</code></td>
</tr>

Expand Down
6 changes: 3 additions & 3 deletions ckan/templates/organization/members.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ <h1 class="hide-heading">{{ _('Members') }}</h1>
<col width="15" />
<thead>
<tr>
<th>{{ _('User') }}</th>
<th>{{ _('Role') }}</th>
<th></th>
<th scope="col">{{ _('User') }}</th>
<th scope="col">{{ _('Role') }}</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
Expand Down
6 changes: 3 additions & 3 deletions ckan/templates/package/resource_read.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ <h2>Additional Information</h2>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Field</th>
<th>Value</th>
<th scope="col">Field</th>
<th scope="col">Value</th>
</tr>
</thead>
<tbody>
{% for key, value in h.format_resource_items(res.items()) %}
<tr><th>{{ key }}</th><td>{{ value }}</td></tr>
<tr><th scope="row">{{ key }}</th><td>{{ value }}</td></tr>
{% endfor %}
</tbody>
</table>
Expand Down
20 changes: 10 additions & 10 deletions ckan/templates/package/snippets/additional_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,60 @@ <h3>{{ _('Additional Info') }}</h3>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>{{ _('Field') }}</th>
<th>{{ _('Value') }}</th>
<th scope="col">{{ _('Field') }}</th>
<th scope="col">{{ _('Value') }}</th>
</tr>
</thead>
<tbody>
{% if pkg_dict.url %}
<tr>
<th class="dataset-label">{{ _('Source') }}</th>
<th scope="row" class="dataset-label">{{ _('Source') }}</th>
<td class="dataset-details" property="foaf:homepage">{{ h.link_to(pkg_dict.url, pkg_dict.url, rel='foaf:homepage', target='_blank') }}</td>
</tr>
{% endif %}

{% if pkg_dict.author_email %}
<tr>
<th class="dataset-label">{{ _("Author") }}</th>
<th scope="row" class="dataset-label">{{ _("Author") }}</th>
<td class="dataset-details" property="dc:creator">{{ h.mail_to(email_address=pkg_dict.author_email, name=pkg_dict.author) }}</td>
</tr>
{% elif pkg_dict.author %}
<tr>
<th class="dataset-label">{{ _("Author") }}</th>
<th scope="row" class="dataset-label">{{ _("Author") }}</th>
<td class="dataset-details" property="dc:creator">{{ pkg_dict.author }}</td>
</tr>
{% endif %}

{% if pkg_dict.maintainer_email %}
<tr>
<th class="dataset-label">{{ _('Maintainer') }}</th>
<th scope="row" class="dataset-label">{{ _('Maintainer') }}</th>
<td class="dataset-details" property="dc:contributor">{{ h.mail_to(email_address=pkg_dict.maintainer_email, name=pkg_dict.maintainer) }}</td>
</tr>
{% elif pkg_dict.maintainer %}
<tr>
<th class="dataset-label">{{ _('Maintainer') }}</th>
<th scope="row" class="dataset-label">{{ _('Maintainer') }}</th>
<td class="dataset-details" property="dc:contributor">{{ pkg_dict.maintainer }}</td>
</tr>
{% endif %}

{% if pkg_dict.version %}
<tr>
<th class="dataset-label">{{ _("Version") }}</th>
<th scope="row" class="dataset-label">{{ _("Version") }}</th>
<td class="dataset-details">{{ pkg_dict.version }}</td>
</tr>
{% endif %}

{% if h.check_access('package_update',{'id':pkg_dict.id}) %}
<tr>
<th class="dataset-label">{{ _("State") }}</th>
<th scope="row" class="dataset-label">{{ _("State") }}</th>
<td class="dataset-details">{{ pkg_dict.state }}</td>
</tr>
{% endif %}

{% for extra in h.sorted_extras(pkg_dict.extras) %}
{% set key, value = extra %}
<tr rel="dc:relation" resource="_:extra{{ i }}">
<th class="dataset-label" property="rdfs:label">{{ _(key) }}</th>
<th scope="row" class="dataset-label" property="rdfs:label">{{ _(key) }}</th>
<td class="dataset-details" property="rdf:value">{{ value }}</td>
</tr>
{% endfor %}
Expand Down

0 comments on commit 6af04e7

Please sign in to comment.