1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-16 18:01:37 +00:00

Improve translation of hidden aria elements

This commit is contained in:
Frédéric Guillot 2024-02-04 12:51:04 -08:00
parent 8367413e84
commit f203326a29
28 changed files with 489 additions and 193 deletions

View file

@ -7,7 +7,6 @@
>
<header class="item-header" dir="auto">
<h2 id="feed-title-{{ .ID }}" class="item-title">
<a href="{{ route "feedEntries" "feedID" .ID }}">
{{ if and (.Icon) (gt .Icon.IconID 0) }}
<img src="{{ route "icon" "iconID" .Icon.IconID }}" width="16" height="16" loading="lazy" alt="">
@ -18,21 +17,17 @@
</h2>
<span class="feed-entries-counter">
<span aria-hidden="true">(</span>
<span class="sr-only">
{{ t "page.feeds.unread_counter" }}:
</span>
<span>{{ .UnreadCount }}</span>
<span class="sr-only">{{ plural "page.unread_entry_count" .UnreadCount .UnreadCount }}</span>
<span aria-hidden="true">{{ .UnreadCount }}</span>
<span aria-hidden="true">/</span>
<span class="sr-only">
{{ t "page.categories.all_counter" }}:
</span>
<span>{{ .NumberOfVisibleEntries }}</span>
<span class="sr-only">{{ plural "page.total_entry_count" .NumberOfVisibleEntries .NumberOfVisibleEntries }}</span>
<span aria-hidden="true">{{ .NumberOfVisibleEntries }}</span>
<span aria-hidden="true">)</span>
</span>
<span class="category">
<a id="feed-category-{{ .ID }}"
href="{{ route "categoryEntries" "categoryID" .Category.ID }}"
aria-label="{{ t "page.feeds.category" }}: {{ .Category.Title }}"
aria-label="{{ t "page.category_label" .Category.Title }}"
>
{{ .Category.Title }}
</a>

View file

@ -61,9 +61,7 @@
{{ if .user }}
<a class="skip-to-content-link" href="#main">
Skip to content
</a>
<a class="skip-to-content-link" href="#main">{{ t "skip_to_content" }}</a>
<header class="header">
<nav>
<div class="logo">
@ -81,7 +79,7 @@
<a href="{{ route "unread" }}"
data-page="unread"
{{ if gt .countUnread 0 }}
aria-label="{{ t "menu.unread" }}, {{ t "page.unread.total" }}: {{ .countUnread }}"
aria-label="{{ t "menu.unread" }}, {{ plural "page.unread_entry_count" .countUnread .countUnread }}"
{{ end }}
>
{{ t "menu.unread" }}

View file

@ -6,7 +6,7 @@
{{ t "page.starred.title" }}
<span aria-hidden="true"> ({{ .total }})</span>
</h1>
<span id="page-header-title-count" class="sr-only">{{ t "page.starred.total" }}: {{ .total }}</span>
<span id="page-header-title-count" class="sr-only">{{ plural "page.starred_entry_count" .total .total }}</span>
</section>
{{ end }}

View file

@ -6,7 +6,7 @@
{{ t "page.categories.title" }}
<span aria-hidden="true"> ({{ .total }})</span>
</h1>
<span id="page-header-title-count" class="sr-only">{{ t "page.categories.total" }}: {{ .total }}</span>
<span id="page-header-title-count" class="sr-only">{{ plural "page.categories_count" .total .total }}</span>
<nav aria-label="{{ t "page.categories.title" }} {{ t "menu.title" }}">
<ul>
<li>

View file

@ -8,9 +8,9 @@
</h1>
<span class="sr-only">
{{ if .showOnlyUnreadEntries }}
{{ t "page.categories.unread_counter" }}: {{ .total }}
{{ plural "page.unread_entry_count" .total .total }}
{{ else }}
{{ t "page.categories.all_counter" }}: {{ .total }}
{{ plural "page.total_entry_count" .total .total }}
{{ end }}
</span>
<nav aria-label="{{ .category.Title }} {{ t "menu.title" }}">
@ -87,7 +87,7 @@
</a>
</h2>
<span class="category">
<a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}" aria-label="{{ t "page.feeds.category" }}: {{ .Feed.Category.Title }}">
<a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}" aria-label="{{ t "page.category_label" .Feed.Category.Title }}">
{{ .Feed.Category.Title }}
</a>
</span>

View file

@ -6,9 +6,7 @@
{{ .category.Title }} <span aria-hidden="true">&gt;</span> {{ t "page.feeds.title" }}
<span aria-hidden="true"> ({{ .total }})</span>
</h1>
<span class="sr-only">
{{ t "page.categories.feeds.total" }}: {{ .total }}
</span>
<span class="sr-only">{{ plural "page.categories.feed_count" .total .total }}</span>
<nav aria-label="{{ .category.Title }} {{ t "page.feeds.title" }} {{ t "menu.title" }}">
<ul>
<li>

View file

@ -8,9 +8,9 @@
</h1>
<span class="sr-only">
{{ if .showOnlyUnreadEntries }}
{{ t "page.feeds.unread_counter" }}: {{ .total }}
{{ plural "page.unread_entry_count" .total .total }}
{{ else }}
{{ t "page.feeds.read_counter" }}: {{ .total }}
{{ plural "page.total_entry_count" .total .total }}
{{ end }}
</span>
<nav aria-label="{{ .feed.Title }} {{ t "menu.title" }}">
@ -118,7 +118,7 @@
<span class="category">
<a
href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}"
aria-label="{{ t "page.feeds.category" }}: {{ .Feed.Category.Title }}"
aria-label="{{ t "page.category_label" .Feed.Category.Title }}"
>
{{ .Feed.Category.Title }}
</a>

View file

@ -6,7 +6,7 @@
{{ t "page.history.title" }}
<span aria-hidden="true">({{ .total }})</span>
</h1>
<span id="page-header-title-count" class="sr-only">{{ t "page.history.total" }}: {{ .total }}</span>
<span id="page-header-title-count" class="sr-only">{{ plural "page.read_entry_count" .total .total }}</span>
<nav aria-label="{{ t "page.history.title" }} {{ t "menu.title" }}">
<ul>
{{ if .entries }}

View file

@ -6,7 +6,7 @@
{{ t "page.shared_entries.title" }}
<span aria-hidden="true">({{ .total }})</span>
</h1>
<span id="page-header-title-count" class="sr-only">{{ t "page.shared_entries.total" }}: {{ .total }}</span>
<span id="page-header-title-count" class="sr-only">{{ plural "page.shared_entries_count" .total .total }}</span>
{{ if .entries }}
<nav aria-label="{{ t "page.shared_entries.title" }} {{ t "menu.title" }}">
<ul>

View file

@ -6,7 +6,7 @@
{{ t "page.unread.title" }}
<span aria-hidden="true">(<span class="unread-counter">{{ .countUnread }}</span>)</span>
</h1>
<span id="page-header-title-count" class="sr-only">{{ t "page.unread.total" }}: {{ .countUnread }}</span>
<span id="page-header-title-count" class="sr-only">{{ plural "page.unread_entry_count" .countUnread .countUnread }}</span>
{{ if .entries }}
<nav aria-label="{{ t "page.unread.title" }} {{ t "menu.title" }}">
<ul>