Skip to content

Commit

Permalink
[DONE] Fix links for accessibility (#924)
Browse files Browse the repository at this point in the history
* Change header & footer titles

* Change logo button in video player

* Change some translations

* Change LINK_PLAYER setting and link of logo in player

* Change title for buttons

* Remove redundant button

* Change files location

* Add LINK_PLAYER_NAME parameter

* Fix some translations

* Fix

* Last fix
  • Loading branch information
AymericJak authored Aug 30, 2023
1 parent f882f28 commit fa5cf0a
Show file tree
Hide file tree
Showing 34 changed files with 253 additions and 133 deletions.
4 changes: 2 additions & 2 deletions pod/chapter/templates/chapter/list_chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ <h1 class="h3 card-title pod-card__title">{% trans 'List of chapters' %}&nbsp;({
{% csrf_token %}
<input type="hidden" name="action" value="modify">
<input type="hidden" name="id" value="{{chapter.id}}">
<input type="submit" title="{% trans 'Edit the chapter' %}" value="{% trans 'Modify' %}" class="btn btn-primary btn-sm m-1">
<input type="submit" title="{% blocktrans with chapter_title=chapter.title %}Modify the chapter “{{ chapter_title }}”{% endblocktrans %}" value="{% trans 'Modify' %}" class="btn btn-primary btn-sm m-1">
</form>
<form class="get_form" action="{% url 'video:chapter:video_chapter' slug=video.slug %}" method="POST">
{% csrf_token %}
<input type="hidden" name="action" value="delete">
<input type="hidden" name="id" value="{{chapter.id}}">
<input type="submit" title="{% trans 'Delete the chapter' %}" value="{% trans 'Delete' %}" class="btn btn-danger btn-sm m-1">
<input type="submit" title="{% blocktrans with chapter_title=chapter.title %}Delete the chapter “{{ chapter_title }}”{% endblocktrans %}" value="{% trans 'Delete' %}" class="btn btn-danger btn-sm m-1">
</form>
</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion pod/chapter/templates/video_chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{% endif %}
</div>
<span class="float-end">
<a href="{% url 'video:video' slug=video.slug %}" title="{% trans 'View the video'%}" class="btn btn btn-secondary btn-sm">
<a href="{% url 'video:video' slug=video.slug %}" title="{% blocktrans with video_title=video.title %}Back to the video “{{ video_title }}”{% endblocktrans %}" class="btn btn btn-secondary btn-sm">
<i class="bi bi-film"></i>&nbsp;{% trans "Back to the video"%}
</a>
</span>
Expand Down
4 changes: 2 additions & 2 deletions pod/completion/templates/contributor/list_contributor.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ <h2 class="card-title pod-card__title">{% trans 'List of contributors' %}&nbsp;(
{% csrf_token %}
<input type="hidden" name="action" value="modify">
<input type="hidden" name="id" value="{{contributor.id}}">
<input type="submit" title="{% trans 'Edit the contributor' %}" value="{% trans 'Modify' %}" class="edt_contributor btn btn-secondary btn-sm">
<input type="submit" title="{% blocktrans with contributor_name=contributor.name %}Modify the contributor “{{ contributor_name }}”{% endblocktrans %}" value="{% trans 'Modify' %}" class="edt_contributor btn btn-secondary btn-sm">
</form>
<form class="form_delete completion d-inline-block" action="{% url 'video:completion:video_completion_contributor' slug=video.slug %}" method="POST">
{% csrf_token %}
<input type="hidden" name="action" value="delete">
<input type="hidden" name="id" value="{{contributor.id}}">
<input type="submit" title="{% trans 'Delete the contributor' %}" value="{% trans 'Delete' %}" class="edt_contributor btn btn-danger btn-sm">
<input type="submit" title="{% blocktrans with contributor_name=contributor.name %}Delete the contributor “{{ contributor_name }}”{% endblocktrans %}" value="{% trans 'Delete' %}" class="edt_contributor btn btn-danger btn-sm">
</form>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions pod/completion/templates/document/list_document.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ <h2 class="card-title pod-card__title">{% trans 'List of additional resources' %
{% csrf_token %}
<input type="hidden" name="action" value="modify">
<input type="hidden" name="id" value="{{doc.id}}">
<input type="submit" title="{% trans 'Edit the additional resource' %}" value="{% trans 'Modify' %}" class="edt_document btn btn-primary btn-sm">
<input type="submit" title="{% blocktrans with document_name=doc.document.name %}Modify the additional resource “{{ document_name }}”{% endblocktrans %}" value="{% trans 'Modify' %}" class="edt_document btn btn-primary btn-sm">
</form>
<form class="form_delete completion d-inline-block" action="{% url 'video:completion:video_completion_document' slug=video.slug %}" method="POST">
{% csrf_token %}
<input type="hidden" name="action" value="delete">
<input type="hidden" name="id" value="{{doc.id}}">
<input type="submit" title="{% trans 'Delete the additional resource' %}" value="{% trans 'Delete' %}" class="edt_document btn btn-danger btn-sm">
<input type="submit" title="{% blocktrans with document_name=doc.document.name %}Delete the additional resource “{{ document_name }}”{% endblocktrans %}" value="{% trans 'Delete' %}" class="edt_document btn btn-danger btn-sm">
</form>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions pod/completion/templates/overlay/list_overlay.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ <h2 class="card-title pod-card__title">{% trans 'List of overlays' %}&nbsp;({{li
{% csrf_token %}
<input type="hidden" name="action" value="modify">
<input type="hidden" name="id" value="{{overlay.id}}">
<input type="submit" title="{% trans 'Edit the overlay' %}" value="{% trans 'Modify' %}" class="edt_overlay btn btn-primary btn-sm">
<input type="submit" title="{% blocktrans with overlay_title=overlay.title %}Modify the overlay “{{ overlay_title }}”{% endblocktrans %}" value="{% trans 'Modify' %}" class="edt_overlay btn btn-primary btn-sm">
</form>
<form class="form_delete completion d-inline-block" action="{% url 'video:completion:video_completion_overlay' slug=video.slug %}" method="POST">
{% csrf_token %}
<input type="hidden" name="action" value="delete">
<input type="hidden" name="id" value="{{overlay.id}}">
<input type="submit" title="{% trans 'Delete the overlay' %}" value="{% trans 'Delete' %}" class="edt_overlay btn btn-danger btn-sm">
<input type="submit" title="{% blocktrans with overlay_title=overlay.title %}Delete the overlay “{{ overlay_title }}”{% endblocktrans %}" value="{% trans 'Delete' %}" class="edt_overlay btn btn-danger btn-sm">
</form>
</td>
</tr>
Expand Down
12 changes: 6 additions & 6 deletions pod/completion/templates/track/list_track.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ <h2 class="card-title pod-card__title">{% trans 'List of subtitle or caption fil
{% csrf_token %}
<input type="hidden" name="action" value="modify">
<input type="hidden" name="id" value="{{track.id}}">
<input type="submit" title="{% trans 'Replace the subtitle or caption files' %}" value="{% trans 'Replace' %}" class="edt_track btn btn-primary btn-sm">
<input type="submit" title="{% blocktrans with track_name=track.src.name %}Replace the subtitle or caption file “{{ track_name }}”{% endblocktrans %}" value="{% trans 'Replace' %}" class="edt_track btn btn-primary btn-sm">
</form>
<a href="{% url 'video:completion:video_caption_maker' slug=video.slug %}?src={{track.src_id}}" id="modifCapSubFile" class="edt_track btn btn-secondary" title="{% trans 'Edit the subtitle or caption files' %}">{% trans 'Modify' %}</a>
<a href="{% url 'video:completion:video_caption_maker' slug=video.slug %}?src={{track.src_id}}" id="modifCapSubFile" class="edt_track btn btn-secondary" title="{% blocktrans with track_name=track.src.name %}Modify the subtitle or caption file “{{ track_name }}”{% endblocktrans %}">{% trans 'Modify' %}</a>
<form class="form_delete completion" action="{% url 'video:completion:video_completion_track' slug=video.slug %}" method="POST">
{% csrf_token %}
<input type="hidden" name="action" value="delete">
<input type="hidden" name="id" value="{{track.id}}">
<input type="submit" title="{% trans 'Remove the subtitle or caption files' %}" value="{% trans 'Remove' %}" class="edt_track btn btn-danger btn-sm">
<input type="submit" title="{% blocktrans with track_name=track.src.name %}Remove the subtitle or caption file “{{ track_name }}”{% endblocktrans %}" value="{% trans 'Remove' %}" class="edt_track btn btn-danger btn-sm">
</form>
<div class="dropdown">
<button class="dot-btn dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Expand All @@ -36,16 +36,16 @@ <h2 class="card-title pod-card__title">{% trans 'List of subtitle or caption fil
{% csrf_token %}
<input type="hidden" name="action" value="modify">
<input type="hidden" name="id" value="{{track.id}}">
<input type="submit" title="{% trans 'Replace the subtitle or caption files' %}" value="{% trans 'Replace' %}" class="edt_track btn btn-primary btn-sm">
<input type="submit" title="{% blocktrans with track_name=track.src.name %}Replace the subtitle or caption file “{{ track_name }}”{% endblocktrans %}" value="{% trans 'Replace' %}" class="edt_track btn btn-primary btn-sm">
</form>
<form class="dropdown-item form_modif completion" action="{% url 'video:completion:video_caption_maker' slug=video.slug %}?src={{track.src_id}}">
<input type="submit" id="modifCapSubFile" class="edt_track btn btn-secondary" title="{% trans 'Edit the subtitle or caption files' %}" value="{% trans 'Modify' %}">
<input type="submit" id="modifCapSubFile" class="edt_track btn btn-secondary" title="{% blocktrans with track_name=track.src.name %}Modify the subtitle or caption file “{{ track_name }}”{% endblocktrans %}" value="{% trans 'Modify' %}">
</form>
<form class="dropdown-item form_delete completion" action="{% url 'video:completion:video_completion_track' slug=video.slug %}" method="POST">
{% csrf_token %}
<input type="hidden" name="action" value="delete">
<input type="hidden" name="id" value="{{track.id}}">
<input type="submit" title="{% trans 'Remove the subtitle or caption files' %}" value="{% trans 'Remove' %}" class="edt_track btn btn-danger btn-sm">
<input type="submit" title="{% blocktrans with track_name=track.src.name %}Remove the subtitle or caption file “{{ track_name }}”{% endblocktrans %}" value="{% trans 'Remove' %}" class="edt_track btn btn-danger btn-sm">
</form>
<!--<a class="dropdown-item" href="#">Something else here</a> -->
</div>
Expand Down
2 changes: 1 addition & 1 deletion pod/cut/templates/video_cut.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<div>
<span class="float-end">
<button type="button" class="btn btn-primary btn-sm m-2" data-bs-toggle="modal" data-bs-target="#ConfirmationModal"><i class="bi bi-scissors"></i>&nbsp;{% trans 'Cut' %}</button>
<a href="{% url 'video:video' slug=video.slug %}" title="{% trans 'View the video'%}" class="btn btn btn-secondary btn-sm">
<a href="{% url 'video:video' slug=video.slug %}" title="{% blocktrans with video_title=video.title %}Back to the video “{{ video_title }}”{% endblocktrans %}" class="btn btn btn-secondary btn-sm">
<i class="bi bi-film"></i>&nbsp;{% trans 'Back to the video' %}
</a>
</span>
Expand Down
4 changes: 2 additions & 2 deletions pod/enrichment/templates/enrichment/list_enrichment.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ <h4 class="card-title pod-card__title">{% trans 'List of the enrichments' %}&nbs
{% csrf_token %}
<input type="hidden" name="action" value="modify">
<input type="hidden" name="id" value="{{enrich.id}}">
<input type="submit" title="{% trans 'Edit the enrichment' %}" value="{% trans 'Modify' %}" class="btn btn-primary btn-sm">
<input type="submit" title="{% blocktrans with enrich_title=enrich.title %}Modify the enrichment “{{ enrich_title }}”{% endblocktrans %}" value="{% trans 'Modify' %}" class="btn btn-primary btn-sm">
</form>
<form class="get_form" action="{% url 'enrichment:video_enrichment' slug=video.slug %}" method="POST">
{% csrf_token %}
<input type="hidden" name="action" value="delete">
<input type="hidden" name="id" value="{{enrich.id}}">
<input type="submit" title="{% trans 'Delete the enrichment' %}" value="{% trans 'Delete' %}" class="btn btn-danger btn-sm">
<input type="submit" title="{% blocktrans with enrich_title=enrich.title %}Delete the enrichment “{{ enrich_title }}”{% endblocktrans %}" value="{% trans 'Delete' %}" class="btn btn-danger btn-sm">
</form>
</td>
</tr>
Expand Down
6 changes: 5 additions & 1 deletion pod/live/templates/live/direct.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ <h2 class="card-title pod-card__title h4">
{% if broadcaster.enable_viewer_count%}
player.videoJsViewerCount();
{% endif %}
player.videoJsLogo({imgsrc: '{% static LOGO_PLAYER %}', linktitle:'{{TITLE_ETB}} - {{TITLE_SITE}}', link:'{{LINK_PLAYER}}'});
player.videoJsLogo({
imgsrc: '{% static LOGO_PLAYER %}',
linktitle: '{{ TITLE_SITE }} - {% if LINK_PLAYER_NAME %}{{ LINK_PLAYER_NAME }}{% else %}{% trans "Home" %}{% endif %} - {% trans "New window" %}',
link: '{{ LINK_PLAYER }}'
});
player.on('error', function() {
// Handle successives errors to avoid multiple reload
if (typeof(errored) == 'undefined' || !errored) {
Expand Down
10 changes: 5 additions & 5 deletions pod/live/templates/live/event-script.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@

player.videoJsLogo({
imgsrc: '{% static LOGO_PLAYER %}',
linktitle: '{{TITLE_ETB}}"-"{{TITLE_SITE}}',
link: '{{LINK_PLAYER}}'
linktitle: '{{ TITLE_SITE }} - {% if LINK_PLAYER_NAME %}{{ LINK_PLAYER_NAME }}{% else %}{% trans "Home" %}{% endif %} - {% trans "New window" %}',
link: '{{ LINK_PLAYER }}'
});

player.on("error", function() {
Expand Down Expand Up @@ -647,9 +647,9 @@
playerOnHold.createModal('{% trans "Live not found, retry in 10 seconds" %}');

playerOnHold.videoJsLogo({
imgsrc: '{% static LOGO_PLAYER %}',
linktitle: '{{TITLE_ETB}} - {{TITLE_SITE}}',
link: '{{LINK_PLAYER}}'
imgsrc: '{% static LOGO_PLAYER %}',
linktitle: '{{ TITLE_SITE }} - {% if LINK_PLAYER_NAME %}{{ LINK_PLAYER_NAME }}{% else %}{% trans "Home" %}{% endif %} - {% trans "New window" %}',
link: '{{ LINK_PLAYER }}'
});

let mp4_sources = {{event.video_on_hold.get_video_mp4_json|safe|default:'null'}};
Expand Down
Binary file modified pod/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit fa5cf0a

Please sign in to comment.