Skip to content

Commit e1cad6f

Browse files
authored
[DONE] A11y for 3.8.2 (#1219)
* Minor code formatting * Add missing DocStrings * Modify some redundant title strings, adding the targeted object * Remove some redundant titles * Correct i18n strings * Correct duplicated id * remove broken aria-label id * Add flatpage title in h1 for accessibility + remove H1 title in legal notice and accessibility statement pages * upgrade gitguardian config version * Update .po/mo lang files
1 parent 7fa6ce0 commit e1cad6f

File tree

35 files changed

+417
-218
lines changed

35 files changed

+417
-218
lines changed

.gitguardian.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
exclude_paths:
1+
version: 2
2+
secret:
3+
ignored_paths:
24
- pod/enrichment/tests/test_views.py

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
- repo: https://github.com/gitguardian/ggshield
3-
rev: v1.27.0
3+
rev: v1.32.0
44
hooks:
55
- id: ggshield
66
language_version: python3
7-
stages: [commit]
7+
stages: [pre-commit]

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# Affiche la liste des commandes disponibles
99
help:
10-
echo "Syntax: [make target] where target is in this list:"
10+
@echo "Syntax: [make target] where target is in this list:"
1111
@awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' $(MAKEFILE_LIST) | column -s: -t
1212

1313
# Démarre le serveur de test

pod/completion/admin.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ def enrich_kaldi_model_launch() -> None:
241241

242242
@admin.action(description=_("Enrich with selected subtitles"))
243243
def enrich_model(modeladmin, request, queryset) -> None:
244+
"""Enrich with selected subtitles."""
244245
text = ""
245246
title = ""
246247
for query in list(queryset.all()):
@@ -249,7 +250,7 @@ def enrich_model(modeladmin, request, queryset) -> None:
249250
title += query.video.title
250251
file = query.src.file
251252
for caption in webvtt.read(file.path):
252-
text += caption.text + " \n"
253+
text += caption.text + "\n"
253254
query.enrich_ready = False
254255
query.save()
255256

pod/dressing/templates/my_dressings.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,15 @@
9191
{% endif %}
9292
</td><td>
9393
<div class="d-flex justify-content-between">
94-
<a href="{% url 'dressing:dressing_edit' dressing_id=dressing.pk %}" class="btn btn-primary me-1" title="{% blocktrans with title=dressing.title %}Edit “{{title}}”{% endblocktrans %}" data-bs-toggle="tooltip" data-bs-placement="top">
94+
<a href="{% url 'dressing:dressing_edit' dressing_id=dressing.pk %}"
95+
class="btn btn-primary me-1"
96+
title="{% blocktrans with title=dressing.title %}Edit “{{title}}”{% endblocktrans %}"
97+
data-bs-toggle="tooltip" data-bs-placement="top">
9598
<i class="bi bi-pencil-square" aria-hidden="true"></i>
9699
</a>
97-
<a href="{% url 'dressing:dressing_delete' dressing_id=dressing.pk %}" class="btn btn-danger" title="{% blocktrans with title=dressing.title%}Delete “{{title}}”{% endblocktrans %}" data-bs-toggle="tooltip" data-bs-placement="top">
100+
<a href="{% url 'dressing:dressing_delete' dressing_id=dressing.pk %}" class="btn btn-danger"
101+
title="{% blocktrans with title=dressing.title%}Delete “{{title}}”{% endblocktrans %}"
102+
data-bs-toggle="tooltip" data-bs-placement="top">
98103
<i class="bi bi-trash" aria-hidden="true"></i>
99104
</a>
100105
</div>

pod/import_video/forms.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ class ExternalRecordingForm(forms.ModelForm):
4242
),
4343
)
4444

45-
def filter_fields_admin(form):
45+
def filter_fields_admin(form) -> None:
4646
"""List fields, depends on user right."""
4747
if not form.is_superuser and not form.is_admin:
4848
form.remove_field("owner")
4949
form.remove_field("site")
5050

51-
def clean(self):
51+
def clean(self) -> None:
5252
"""Clean method."""
5353
cleaned_data = super(ExternalRecordingForm, self).clean()
5454
try:

pod/import_video/templates/import_video/add_or_edit.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{% if form.errors %}
3434
<p class="text-danger">{% trans "One or more errors have been found in the form." %}<br>
3535
{% for error in form.non_field_errors %}
36-
<span> - {{ error }}</span> <br>
36+
<span> - {{ error }}</span><br>
3737
{% endfor %}
3838
</p>
3939
{% endif %}

pod/live/templates/live/event-info.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,13 @@ <h2 class="modal-title h5" id="shareLabel">
118118
<input class="form-control" type="text" name="txtpartage" id="txtpartage" value="{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.META.HTTP_HOST }}{% url 'live:event' slug=event.slug %}{% if event.is_draft == True %}{{ event.get_hashkey }}/{% endif %}">
119119
</div>
120120
<div class="form-group m-2">
121-
{% get_event_qrcode event.id as qrcode %}
122-
<label>{% trans 'QR code for this link:' %}&nbsp;</label><br>
121+
{% get_event_qrcode event.id as qrcode %}
122+
<label>{% trans 'QR code for this link:' %}</label><br>
123123
{{ qrcode }}
124124
<br>
125-
<button id="btn-download-qr-code" type="submit" data-slug="{{ event.slug }}" class="btn btn-primary my-2" title="{% trans 'Download this QR code' %}">{% trans 'Download' %}</button>
125+
<button id="btn-download-qr-code" type="submit" data-slug="{{ event.slug }}"
126+
class="btn btn-primary my-2"
127+
title="{% trans 'Download this QR code' %}">{% trans 'Download' %}</button>
126128
</div>
127129
</fieldset>
128130
</div> <!-- End modal body-->

pod/live/templates/live/event_card.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<p class="small video-title">
5757
<a href="{{event.get_absolute_url}}
5858
{% if playlist %}?playlist={{playlist.slug}}{% endif %}"
59-
title="{{event.title}}">
59+
title="{% blocktrans with title=event.title %}See the event “{{ title }}”.{% endblocktrans %}">
6060
{{event.title|capfirst|truncatechars:43}}
6161
</a>
6262
</br>

pod/live/templates/live/my_events.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</div>
2121
{% if display_creation_button %}
2222
<div class="d-flex infinite-container mb-2" id="event_add">
23-
<a class="btn btn-primary" href="{% url 'live:event_edit' %}" title="{% trans 'Plan an event' %}">
23+
<a class="btn btn-primary" href="{% url 'live:event_edit' %}">
2424
<i class="bi bi-plus pod-add" aria-hidden="true"></i>
2525
<span>{% trans "Plan an event" %}</span>
2626
</a>

pod/locale/fr/LC_MESSAGES/django.mo

-9.66 KB
Binary file not shown.

0 commit comments

Comments
 (0)