Improve screenreader accessibility

This commit is contained in:
Raphael Michel
2018-05-09 17:12:26 +02:00
parent 0a9aeca3bc
commit 71c8267dea
4 changed files with 31 additions and 10 deletions

View File

@@ -74,7 +74,9 @@
{% for var in item.available_variations %}
<div class="row-fluid product-row variation">
<div class="col-md-8 col-xs-12">
{{ var }}
<label for="variation_{{ item.id }}_{{ var.id }}">
{{ var }}
</label>
{% if var.description %}
<div class="variation-description">
{{ var.description|localize|rich_text }}
@@ -89,6 +91,7 @@
placeholder="0"
min="{% if event.settings.display_net_prices %}{{ var.display_price.net|stringformat:"0.2f" }}{% else %}{{ var.display_price.gross|stringformat:"0.2f" }}{% endif %}"
name="price_{{ item.id }}_{{ var.id }}"
title="{% blocktrans trimmed with item=var.value %}Modify price for {{ item }}{% endblocktrans %}"
value="{% if event.settings.display_net_prices %}{{var.display_price.net|stringformat:"0.2f" }}{% else %}{{ var.display_price.gross|stringformat:"0.2f" }}{% endif %}"
step="any">
</div>
@@ -115,10 +118,13 @@
{% if max_times > 1 %}
<input type="number" class="form-control input-item-count" placeholder="0" min="0"
pattern="\d*"
max="{{ item.order_max }}" name="variation_{{ item.id }}_{{ var.id }}">
max="{{ item.order_max }}"
id="variation_{{ item.id }}_{{ var.id }}"
name="variation_{{ item.id }}_{{ var.id }}">
{% else %}
<input type="radio" name="_voucher_item"
{% if options == 1 %}checked="checked"{% endif %}
id="variation_{{ item.id }}_{{ var.id }}"
value="variation_{{ item.id }}_{{ var.id }}">
{% endif %}
</label>
@@ -144,7 +150,7 @@
</a>
{% endif %}
<div class="product-description {% if item.picture %}with-picture{% endif %}">
<strong>{{ item.name }}</strong>
<label for="item_{{ item.id }}"><strong>{{ item.name }}</strong></label>
{% if item.description %}
<div class="product-description">
{{ item.description|localize|rich_text }}
@@ -159,6 +165,7 @@
<input type="number" class="form-control input-item-price" placeholder="0"
min="{% if event.settings.display_net_prices %}{{ item.display_price.net|stringformat:"0.2f" }}{% else %}{{ item.display_price.gross|stringformat:"0.2f" }}{% endif %}"
name="price_{{ item.id }}"
title="{% blocktrans trimmed with item=item.name %}Modify price for {{ item }}{% endblocktrans %}"
value="{% if event.settings.display_net_prices %}{{ item.display_price.net|stringformat:"0.2f" }}{% else %}{{ item.display_price.gross|stringformat:"0.2f" }}{% endif %}"
step="any">
</div>
@@ -185,10 +192,13 @@
{% if max_times > 1 %}
<input type="number" class="form-control input-item-count" placeholder="0" min="0"
pattern="\d*"
max="{{ item.order_max }}" name="item_{{ item.id }}">
max="{{ item.order_max }}"
id="item_{{ item.id }}"
name="item_{{ item.id }}">
{% else %}
<input type="radio" name="_voucher_item"
{% if options == 1 %}checked="checked"{% endif %}
id="item_{{ item.id }}"
value="item_{{ item.id }}">
{% endif %}
</label>