From 7822ed20302afb3b04899a0ad5acd4e9b0b77f0b Mon Sep 17 00:00:00 2001 From: forgejo-backport-action Date: Fri, 3 Apr 2026 18:53:23 +0200 Subject: [PATCH] [v15.0/forgejo] Add aria-current="page" to active navbar items (#11969) **Backport:** https://codeberg.org/forgejo/forgejo/pulls/11887 By setting `aria-current="page"` on the active navbar item we make the information about which one corresponds to the current page available in a non-visual way. Both the attached screen recordings were produced on http://localhost:3000/pulls, so the "Pull requests" link is the active one. In `before.mp4` all the links are announced identically, and in `after.mp4` the "Pull requests" link is announced like this. > current page, visited, link, Pull requests ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [ ] I did not document these changes and I do not expect someone else to do it. ### Release notes - [x] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change. - [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change. *The decision if the pull request will be shown in the release notes is up to the mergers / release team.* The content of the `release-notes/.md` file will serve as the basis for the release notes. If the file does not exist, the title of the pull request will be used instead. Co-authored-by: Henry Catalini Smith Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11969 Reviewed-by: Mathieu Fenniak Co-authored-by: forgejo-backport-action Co-committed-by: forgejo-backport-action --- templates/base/head_navbar.tmpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index e4627451cd..f7405a743e 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -28,21 +28,21 @@ {{/* No links */}} {{else if .IsSigned}} {{if not .UnitIssuesGlobalDisabled}} - {{ctx.Locale.Tr "issues"}} + {{ctx.Locale.Tr "issues"}} {{end}} {{if not .UnitPullsGlobalDisabled}} - {{ctx.Locale.Tr "pull_requests"}} + {{ctx.Locale.Tr "pull_requests"}} {{end}} {{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}} {{if .ShowMilestonesDashboardPage}} - {{ctx.Locale.Tr "milestones"}} + {{ctx.Locale.Tr "milestones"}} {{end}} {{end}} - {{ctx.Locale.Tr "explore"}} + {{ctx.Locale.Tr "explore"}} {{else if .IsLandingPageOrganizations}} - {{ctx.Locale.Tr "explore"}} + {{ctx.Locale.Tr "explore"}} {{else}} - {{ctx.Locale.Tr "explore"}} + {{ctx.Locale.Tr "explore"}} {{end}} {{template "custom/extra_links" .}}