diff options
| author | Kanishk Pachauri <itskanishkp.py@gmail.com> | 2026-03-10 09:20:24 +0800 |
|---|---|---|
| committer | Saptak Sengupta <saptak013@gmail.com> | 2026-04-27 12:31:31 +0530 |
| commit | 092aebfbdbfb1c64d2cd576e032bbaf9bdca47a4 (patch) | |
| tree | 5024998aa0d8c299a0187f37e6d0e0a2494bd264 | |
| parent | fd173c6d2fd4eca7f8b1a366ae4f5ff62486704e (diff) | |
Fix accessibility: add missing labels to fundraising SVG and images
| -rw-r--r-- | djangoproject/templates/fundraising/includes/_hero_with_logo.html | 2 | ||||
| -rw-r--r-- | djangoproject/templates/fundraising/includes/donation_form_with_heart.html | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/djangoproject/templates/fundraising/includes/_hero_with_logo.html b/djangoproject/templates/fundraising/includes/_hero_with_logo.html index cd248457..25f356ba 100644 --- a/djangoproject/templates/fundraising/includes/_hero_with_logo.html +++ b/djangoproject/templates/fundraising/includes/_hero_with_logo.html @@ -1,7 +1,7 @@ {% load i18n static thumbnail %} <div class="hero"> <div class="hero-logo"> - {% if obj.url %}<a href="{{ obj.url }}" rel="nofollow">{% endif %} + {% if obj.url %}<a href="{{ obj.url }}" rel="nofollow" aria-label="{{ obj.display_name }}">{% endif %} {% if obj.logo %} <img src="{{ obj.thumbnail.url }}" diff --git a/djangoproject/templates/fundraising/includes/donation_form_with_heart.html b/djangoproject/templates/fundraising/includes/donation_form_with_heart.html index af62151a..68e22bb9 100644 --- a/djangoproject/templates/fundraising/includes/donation_form_with_heart.html +++ b/djangoproject/templates/fundraising/includes/donation_form_with_heart.html @@ -4,7 +4,7 @@ <div class="fundraising-index" id="donate"> <div class="fundraising-heart" data-percent="{{ goal_percent }}"> - <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 503 431"> + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 503 431" role="img" aria-label="{% blocktranslate trimmed %}Fundraising progress: {{ goal_percent }} funded{% endblocktranslate %}"> <switch> <g> <g transform="translate(4, 2)" id="pixels"> @@ -13,7 +13,7 @@ <text x="50%" y="43%" alignment-baseline="middle" text-anchor="middle">{{ goal_percent }}%</text> </g> <foreignObject> - <img src="{% static 'img/fundraising-heart.svg' %}" /> + <img src="{% static 'img/fundraising-heart.svg' %}" alt="{% translate 'Fundraising heart logo' %}" /> </foreignObject> </switch> </svg> |
