Address test failures on empty table headings

pull/12289/head
Matt Westcott 2024-08-02 20:35:25 +01:00 zatwierdzone przez Thibaud Colas
rodzic 41f768b2ab
commit 0c411651b8
4 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -26,7 +26,6 @@
{% for codename, short_label, long_label in formset.permission_types %}
<th title="{{ long_label }}">{{ short_label }}</th>
{% endfor %}
<th></th>
</tr>
</thead>
<tbody id="id_{{ formset.prefix }}-FORMS">

Wyświetl plik

@ -92,7 +92,10 @@ class NavigateToChildrenColumn(BaseColumn):
return context
def render_header_html(self, parent_context):
return mark_safe("<th></th>")
# This column has no header, as the cell's function will vary between "explore child pages"
# and "add child page", and this link provides all the signposting needed. Render it as a
# <td> rather than <th> as headings cannot be empty (https://dequeuniversity.com/rules/axe/4.9/empty-table-header).
return mark_safe("<td></td>")
class PageTable(Table):

Wyświetl plik

@ -105,7 +105,6 @@
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th></th>
</tr>
</thead>
<tbody>

Wyświetl plik

@ -25,7 +25,6 @@
{% for identifier, short_label, long_label in formset.permission_types %}
<th title="{{ long_label }}">{{ short_label }}</th>
{% endfor %}
<th></th>
</tr>
</thead>
<tbody id="id_{{ formset.prefix }}-FORMS">