From 638e6160e84ac4625af35f4e473a8a8610ca06df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Leopoldo=20Sologuren=20Guti=C3=A9rrez?= Date: Fri, 27 Jan 2023 19:40:17 -0300 Subject: [PATCH 1/6] Fixes accessibility of empty repository commit status (#22632) Avoid empty labelled anchor in repo without commits. Contributed by @forgejo. --- templates/repo/commit_statuses.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index d682709082..4fe644ff0a 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,4 +1,4 @@ -{{template "repo/commit_status" .Status}} +{{if eq (len .Statuses) 1}}{{$status := index .Statuses 0}}{{if $status.TargetURL}}{{template "repo/commit_status" .Status}}{{end}}{{end}}
{{range .Statuses}} From b0e338283459f0af2bdf66a568517fb4c1aeaafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Leopoldo=20Sologuren=20Guti=C3=A9rrez?= Date: Sat, 28 Jan 2023 22:29:10 -0300 Subject: [PATCH 2/6] Improve accessibility of navigation bar and footer (#22635) Added ARIA navigation landmark to navigation bar and aria label for both nav bar and footer. Contributed by @forgejo. --------- Co-authored-by: Lunny Xiao --- options/locale/locale_en-US.ini | 6 ++++++ templates/base/footer_content.tmpl | 6 +++--- templates/base/head_navbar.tmpl | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index a1c250f94c..257cd8cb93 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -106,6 +106,12 @@ never = Never rss_feed = RSS Feed +[aria] +navbar = Navigation Bar +footer = Footer +footer.software = About Software +footer.links = Links + [filter] string.asc = A - Z string.desc = Z - A diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl index 89be609225..c3b96a0245 100644 --- a/templates/base/footer_content.tmpl +++ b/templates/base/footer_content.tmpl @@ -1,6 +1,6 @@ -