fix: add role=status to stock badge indicators for better screen reader support

Agent-Logs-Url: https://github.com/dsaub/proyecto-final/sessions/b6a3a32a-ff80-4431-9ba0-769cbd08b939

Co-authored-by: dsaub <54474838+dsaub@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-28 07:11:20 +00:00
committed by GitHub
parent a36740b02d
commit ad9fa741e5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -59,7 +59,7 @@
{% if item.product.stock > 0 %} {% if item.product.stock > 0 %}
{{ item.product.stock }} {{ item.product.stock }}
{% else %} {% else %}
<span class="text-danger"><span aria-hidden="true"></span> Sin stock</span> <span class="text-danger" role="status"><span aria-hidden="true"></span> Sin stock</span>
{% endif %} {% endif %}
</td> </td>
<td class="price">{{ item.get_subtotal_with_vat|format_price }} €</td> <td class="price">{{ item.get_subtotal_with_vat|format_price }} €</td>
+2 -2
View File
@@ -41,9 +41,9 @@
</div> </div>
<div class="mt-3"> <div class="mt-3">
{% if product.stock > 0 %} {% if product.stock > 0 %}
<span class="badge bg-success"><span aria-hidden="true"></span> Stock disponible: {{ product.stock }}</span> <span class="badge bg-success" role="status"><span aria-hidden="true"></span> Stock disponible: {{ product.stock }}</span>
{% else %} {% else %}
<span class="badge bg-danger"><span aria-hidden="true"></span> Sin stock</span> <span class="badge bg-danger" role="status"><span aria-hidden="true"></span> Sin stock</span>
{% endif %} {% endif %}
</div> </div>