Skip to content

Commit 14ab4fa

Browse files
committed
Add main landmark to templates and adjust titles
* Add main aria landmark to templates * Adjust some titles to improve understanding of location in navigation Contributed by @forgejo
1 parent 1e0e79d commit 14ab4fa

File tree

171 files changed

+177
-176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+177
-176
lines changed

Diff for: routers/web/admin/hooks.go

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const (
2222
func DefaultOrSystemWebhooks(ctx *context.Context) {
2323
var err error
2424

25+
ctx.Data["Title"] = ctx.Tr("admin.hooks")
2526
ctx.Data["PageIsAdminSystemHooks"] = true
2627
ctx.Data["PageIsAdminDefaultHooks"] = true
2728

Diff for: routers/web/repo/setting.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const (
6060
// SettingsCtxData is a middleware that sets all the general context data for the
6161
// settings template.
6262
func SettingsCtxData(ctx *context.Context) {
63-
ctx.Data["Title"] = ctx.Tr("repo.settings")
63+
ctx.Data["Title"] = ctx.Tr("repo.settings.options")
6464
ctx.Data["PageIsSettingsOptions"] = true
6565
ctx.Data["ForcePrivate"] = setting.Repository.ForcePrivate
6666
ctx.Data["MirrorsEnabled"] = setting.Mirror.Enabled
@@ -879,7 +879,7 @@ func handleSettingRemoteAddrError(ctx *context.Context, err error, form *forms.R
879879

880880
// Collaboration render a repository's collaboration page
881881
func Collaboration(ctx *context.Context) {
882-
ctx.Data["Title"] = ctx.Tr("repo.settings")
882+
ctx.Data["Title"] = ctx.Tr("repo.settings.collaboration")
883883
ctx.Data["PageIsSettingsCollaboration"] = true
884884

885885
users, err := repo_model.GetCollaborators(ctx, ctx.Repo.Repository.ID, db.ListOptions{})
@@ -1119,7 +1119,7 @@ func GitHooksEditPost(ctx *context.Context) {
11191119

11201120
// DeployKeys render the deploy keys list of a repository page
11211121
func DeployKeys(ctx *context.Context) {
1122-
ctx.Data["Title"] = ctx.Tr("repo.settings.deploy_keys")
1122+
ctx.Data["Title"] = ctx.Tr("repo.settings.deploy_keys") + " / " + ctx.Tr("secrets.secrets")
11231123
ctx.Data["PageIsSettingsKeys"] = true
11241124
ctx.Data["DisableSSH"] = setting.SSH.Disabled
11251125

Diff for: routers/web/repo/setting_protected_branch.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const (
3131

3232
// ProtectedBranchRules render the page to protect the repository
3333
func ProtectedBranchRules(ctx *context.Context) {
34-
ctx.Data["Title"] = ctx.Tr("repo.settings")
34+
ctx.Data["Title"] = ctx.Tr("repo.settings.branches")
3535
ctx.Data["PageIsSettingsBranches"] = true
3636

3737
rules, err := git_model.FindRepoProtectedBranchRules(ctx, ctx.Repo.Repository.ID)
@@ -46,7 +46,7 @@ func ProtectedBranchRules(ctx *context.Context) {
4646

4747
// SetDefaultBranchPost set default branch
4848
func SetDefaultBranchPost(ctx *context.Context) {
49-
ctx.Data["Title"] = ctx.Tr("repo.settings")
49+
ctx.Data["Title"] = ctx.Tr("repo.settings.branches.update_default_branch")
5050
ctx.Data["PageIsSettingsBranches"] = true
5151

5252
repo := ctx.Repo.Repository

Diff for: routers/web/repo/tag.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func DeleteProtectedTagPost(ctx *context.Context) {
133133
}
134134

135135
func setTagsContext(ctx *context.Context) error {
136-
ctx.Data["Title"] = ctx.Tr("repo.settings")
136+
ctx.Data["Title"] = ctx.Tr("repo.settings.tags")
137137
ctx.Data["PageIsSettingsTags"] = true
138138

139139
protectedTags, err := git_model.GetProtectedTags(ctx, ctx.Repo.Repository.ID)

Diff for: routers/web/user/setting/account.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const (
3030

3131
// Account renders change user's password, user's email and user suicide page
3232
func Account(ctx *context.Context) {
33-
ctx.Data["Title"] = ctx.Tr("settings")
33+
ctx.Data["Title"] = ctx.Tr("settings.account")
3434
ctx.Data["PageIsSettingsAccount"] = true
3535
ctx.Data["Email"] = ctx.Doer.Email
3636
ctx.Data["EnableNotifyMail"] = setting.Service.EnableNotifyMail

Diff for: routers/web/user/setting/adopt.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717

1818
// AdoptOrDeleteRepository adopts or deletes a repository
1919
func AdoptOrDeleteRepository(ctx *context.Context) {
20-
ctx.Data["Title"] = ctx.Tr("settings")
20+
ctx.Data["Title"] = ctx.Tr("settings.adopt")
2121
ctx.Data["PageIsSettingsRepos"] = true
2222
allowAdopt := ctx.IsUserSiteAdmin() || setting.Repository.AllowAdoptionOfUnadoptedRepositories
2323
ctx.Data["allowAdopt"] = allowAdopt

Diff for: routers/web/user/setting/applications.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const (
2121

2222
// Applications render manage access token page
2323
func Applications(ctx *context.Context) {
24-
ctx.Data["Title"] = ctx.Tr("settings")
24+
ctx.Data["Title"] = ctx.Tr("settings.applications")
2525
ctx.Data["PageIsSettingsApplications"] = true
2626

2727
loadApplicationsData(ctx)

Diff for: routers/web/user/setting/keys.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323

2424
// Keys render user's SSH/GPG public keys page
2525
func Keys(ctx *context.Context) {
26-
ctx.Data["Title"] = ctx.Tr("settings")
26+
ctx.Data["Title"] = ctx.Tr("settings.ssh_gpg_keys")
2727
ctx.Data["PageIsSettingsKeys"] = true
2828
ctx.Data["DisableSSH"] = setting.SSH.Disabled
2929
ctx.Data["BuiltinSSH"] = setting.SSH.StartBuiltinServer

Diff for: routers/web/user/setting/profile.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const (
4242

4343
// Profile render user's profile page
4444
func Profile(ctx *context.Context) {
45-
ctx.Data["Title"] = ctx.Tr("settings")
45+
ctx.Data["Title"] = ctx.Tr("settings.profile")
4646
ctx.Data["PageIsSettingsProfile"] = true
4747
ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice()
4848

@@ -219,7 +219,7 @@ func DeleteAvatar(ctx *context.Context) {
219219

220220
// Organization render all the organization of the user
221221
func Organization(ctx *context.Context) {
222-
ctx.Data["Title"] = ctx.Tr("settings")
222+
ctx.Data["Title"] = ctx.Tr("settings.organization")
223223
ctx.Data["PageIsSettingsOrganization"] = true
224224

225225
opts := organization.FindOrgOptions{
@@ -254,7 +254,7 @@ func Organization(ctx *context.Context) {
254254

255255
// Repos display a list of all repositories of the user
256256
func Repos(ctx *context.Context) {
257-
ctx.Data["Title"] = ctx.Tr("settings")
257+
ctx.Data["Title"] = ctx.Tr("settings.repos")
258258
ctx.Data["PageIsSettingsRepos"] = true
259259
ctx.Data["allowAdopt"] = ctx.IsUserSiteAdmin() || setting.Repository.AllowAdoptionOfUnadoptedRepositories
260260
ctx.Data["allowDelete"] = ctx.IsUserSiteAdmin() || setting.Repository.AllowDeleteOfUnadoptedRepositories
@@ -360,7 +360,7 @@ func Repos(ctx *context.Context) {
360360

361361
// Appearance render user's appearance settings
362362
func Appearance(ctx *context.Context) {
363-
ctx.Data["Title"] = ctx.Tr("settings")
363+
ctx.Data["Title"] = ctx.Tr("settings.appearance")
364364
ctx.Data["PageIsSettingsAppearance"] = true
365365

366366
var hiddenCommentTypes *big.Int

Diff for: routers/web/user/setting/security/security.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222

2323
// Security render change user's password page and 2FA
2424
func Security(ctx *context.Context) {
25-
ctx.Data["Title"] = ctx.Tr("settings")
25+
ctx.Data["Title"] = ctx.Tr("settings.security")
2626
ctx.Data["PageIsSettingsSecurity"] = true
2727

2828
if ctx.FormString("openid.return_to") != "" {

Diff for: templates/admin/applications/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin config">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin config">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
<div class="twelve wide column content">

Diff for: templates/admin/applications/oauth2_edit.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin config">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin config">
33
{{template "admin/navbar" .}}
44

55
{{template "user/settings/applications_oauth2_edit_form" .}}

Diff for: templates/admin/auth/edit.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin edit authentication">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin edit authentication">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/auth/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin authentication">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin authentication">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/auth/new.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin new authentication">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin new authentication">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/config.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin config">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin config">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/dashboard.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin dashboard">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin dashboard">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/emails/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin user">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/hook_new.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin settings new webhook">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin settings new webhook">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/hooks.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin hooks">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin hooks">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/monitor.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin monitor">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin monitor">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/notice.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin notice">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin notice">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/org/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin user">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/packages/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin user">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/queue.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin monitor">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin monitor">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/repo/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin user">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/repo/unadopted.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin user">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/stacktrace.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin monitor">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin monitor">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/user/edit.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin edit user">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin edit user">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/user/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin user">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin user">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/admin/user/new.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content admin new user">
2+
<div role="main" aria-label="{{.Title}}" class="page-content admin new user">
33
{{template "admin/navbar" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/explore/code.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content explore users">
2+
<div role="main" aria-label="{{.Title}}" class="page-content explore users">
33
{{template "explore/navbar" .}}
44
<div class="ui container">
55
{{template "code/searchform" .}}

Diff for: templates/explore/organizations.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content explore users">
2+
<div role="main" aria-label="{{.Title}}" class="page-content explore users">
33
{{template "explore/navbar" .}}
44
<div class="ui container">
55
{{template "explore/search" .}}

Diff for: templates/explore/repos.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content explore repositories">
2+
<div role="main" aria-label="{{.Title}}" class="page-content explore repositories">
33
{{template "explore/navbar" .}}
44
<div class="ui container">
55
{{template "explore/repo_search" .}}

Diff for: templates/explore/users.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content explore users">
2+
<div role="main" aria-label="{{.Title}}" class="page-content explore users">
33
{{template "explore/navbar" .}}
44
<div class="ui container">
55
{{template "explore/search" .}}

Diff for: templates/home.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content home">
2+
<div role="main" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}" class="page-content home">
33
<div class="ui stackable middle very relaxed page grid">
44
<div class="sixteen wide center aligned centered column">
55
<div>

Diff for: templates/install.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content install">
2+
<div role="main" aria-label="{{.Title}}" class="page-content install">
33
<div class="ui middle very relaxed page grid">
44
<div class="sixteen wide center aligned centered column">
55
<h3 class="ui top attached header">

Diff for: templates/org/create.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content organization new org">
2+
<div role="main" aria-label="{{.Title}}" class="page-content organization new org">
33
<div class="ui middle very relaxed page grid">
44
<div class="column">
55
<form class="ui form" action="{{.Link}}" method="post">

Diff for: templates/org/home.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content organization profile">
2+
<div role="main" aria-label="{{.Title}}" class="page-content organization profile">
33
<div class="ui container df">
44
{{avatar .Org 140 "org-avatar"}}
55
<div id="org-info">

Diff for: templates/org/member/members.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content organization members">
2+
<div role="main" aria-label="{{.Title}}" class="page-content organization members">
33
{{template "org/header" .}}
44
<div class="ui container">
55
{{template "base/alert" .}}

Diff for: templates/org/projects/list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content repository packages">
2+
<div role="main" aria-label="{{.Title}}" class="page-content repository packages">
33
{{template "user/overview/header" .}}
44
{{template "projects/list" .}}
55
</div>

Diff for: templates/org/projects/new.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content repository packages">
2+
<div role="main" aria-label="{{.Title}}" class="page-content repository packages">
33
{{template "user/overview/header" .}}
44
{{template "projects/new" .}}
55
</div>

Diff for: templates/org/projects/view.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content repository packages">
2+
<div role="main" aria-label="{{.Title}}" class="page-content repository packages">
33
{{template "user/overview/header" .}}
44
{{template "projects/view" .}}
55
</div>

Diff for: templates/org/settings/applications.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content organization settings options">
2+
<div role="main" aria-label="{{.Title}}" class="page-content organization settings options">
33
{{template "org/header" .}}
44
<div class="ui container">
55
<div class="ui grid">

Diff for: templates/org/settings/applications_oauth2_edit.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content organization settings options">
2+
<div role="main" aria-label="{{.Title}}" class="page-content organization settings options">
33
{{template "org/header" .}}
44

55
{{template "user/settings/applications_oauth2_edit_form" .}}

Diff for: templates/org/settings/delete.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="page-content organization settings delete">
2+
<div role="main" aria-label="{{.Title}}" class="page-content organization settings delete">
33
{{template "org/header" .}}
44
<div class="ui container">
55
<div class="ui grid">

0 commit comments

Comments
 (0)