ARIA button, link, and menuitem must have an accessible name

https://dequeuniversity.com/rules/axe/4.3/aria-command-name

In this case, the menuitem wasn't displayed (because the div was hidden). I prefer not to include the menuitem in that situation.
This commit is contained in:
Joachim 2022-02-12 16:25:40 +01:00
parent f742cc023b
commit 7877524116

View file

@ -5,10 +5,10 @@
{% with next_shelf_identifier=active_shelf.shelf.identifier|next_shelf %}
{% for shelf in shelves %}
{% if next_shelf_identifier != shelf.identifier %}
{% comparison_bool shelf.identifier active_shelf.shelf.identifier as is_current %}
<li role="menuitem" class="dropdown-item p-0">
<div
class="{% if next_shelf_identifier == shelf.identifier %}is-hidden{% endif %}"
data-shelf-dropdown-identifier="{{ shelf.identifier }}"
data-shelf-next="{{ shelf.identifier|next_shelf }}"
>
@ -46,6 +46,7 @@
{% endif %}
</div>
</li>
{% endif %}
{% endfor %}
{% if readthrough and active_shelf.shelf.identifier != 'read' %}