Compare commits

...

3 Commits

Author SHA1 Message Date
Richard Schreiber
fc8f109562 make HTML even more readable 2024-08-28 13:40:29 +02:00
Richard Schreiber
39d7675e14 make markup more readable 2024-08-28 13:37:56 +02:00
Richard Schreiber
ed3fc15956 A11y: improve html-source with h3.sr-only for uncategorized products 2024-08-28 12:41:14 +02:00

View File

@@ -6,13 +6,16 @@
{% load eventsignal %}
{% load rich_text %}
{% for tup in items_by_category %}
<section {% if tup.0 %}aria-labelledby="category-{{ tup.0.id }}"{% else %}aria-label="{% trans "Uncategorized items" %}"{% endif %}{% if tup.0.description %} aria-describedby="category-info-{{ tup.0.id }}"{% endif %}>
{% if tup.0 %}
{% if tup.0 %}
<section aria-labelledby="category-{{ tup.0.id }}"{% if tup.0.description %} aria-describedby="category-info-{{ tup.0.id }}"{% endif %}>
<h3 id="category-{{ tup.0.id }}">{{ tup.0.name }}</h3>
{% if tup.0.description %}
<div id="category-info-{{ tup.0.id }}">{{ tup.0.description|localize|rich_text }}</div>
{% endif %}
{% endif %}
{% else %}
<section aria-labelledby="category-none">
<h3 id="category-none" class="sr-only">{% trans "Uncategorized items" %}</h3>
{% endif %}
{% for item in tup.1 %}
{% if item.has_variations %}
<article aria-labelledby="item-{{ item.pk }}-legend"{% if item.description %} aria-describedby="item-{{ item.pk }}-description"{% endif %} class="item-with-variations{% if event.settings.show_variations_expanded %} details-open{% endif %}" id="item-{{ item.pk }}">