From 0c4ca15003745910ffc7231a55a074a293abd08e Mon Sep 17 00:00:00 2001 From: Antoine Clausse Date: Tue, 23 Apr 2024 13:13:38 +0200 Subject: [PATCH] [web] Add `#main-content` to some pug pages (fix skip-to-content links) (#18050) * Add `#main-content` to some pug pages This fixes our `skip-to-content` accessibility anchor links. Alternatively or additionally, we can set `suppressSkipToContent = true` in some pages: that will remove the anchor link in the page. While working on this, I noticed that sometimes we still have a bit of extra nesting or components that should maybe be out of `
` or `#main-content`. In a future PR we can maybe update these elements to target the "real core content" of the page. * Add `suppressSkipToContent` in confirm-email page GitOrigin-RevId: 6cbf4112f2d1a2d8eff06f142d0c2b4f3a5d9cff --- services/web/app/views/admin/index.pug | 2 +- services/web/app/views/referal/bonus.pug | 2 +- services/web/app/views/user/compromised_password.pug | 2 +- services/web/modules/launchpad/app/views/launchpad.pug | 2 +- services/web/modules/user-activate/app/views/user/register.pug | 3 +-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/services/web/app/views/admin/index.pug b/services/web/app/views/admin/index.pug index 295bce277d..9897c912c4 100644 --- a/services/web/app/views/admin/index.pug +++ b/services/web/app/views/admin/index.pug @@ -2,7 +2,7 @@ extends ../layout-marketing include ../_mixins/bookmarkable_tabset block content - .content.content-alt + .content.content-alt#main-content .container .row .col-xs-12 diff --git a/services/web/app/views/referal/bonus.pug b/services/web/app/views/referal/bonus.pug index d32b58fda6..b6c8de3ed3 100644 --- a/services/web/app/views/referal/bonus.pug +++ b/services/web/app/views/referal/bonus.pug @@ -1,7 +1,7 @@ extends ../layout-marketing block content - .content.content-alt + .content.content-alt#main-content .container.bonus .row .col-md-8.col-md-offset-2 diff --git a/services/web/app/views/user/compromised_password.pug b/services/web/app/views/user/compromised_password.pug index 30353ede4b..376da0fe2a 100644 --- a/services/web/app/views/user/compromised_password.pug +++ b/services/web/app/views/user/compromised_password.pug @@ -11,5 +11,5 @@ block entrypointVar block append meta block content - main.content.content-alt + main.content.content-alt#main-content #compromised-password diff --git a/services/web/modules/launchpad/app/views/launchpad.pug b/services/web/modules/launchpad/app/views/launchpad.pug index 24dc2013b7..820c030441 100644 --- a/services/web/modules/launchpad/app/views/launchpad.pug +++ b/services/web/modules/launchpad/app/views/launchpad.pug @@ -31,7 +31,7 @@ block append meta block content script(type="text/javascript", nonce=scriptNonce, src=(wsUrl || '/socket.io') + '/socket.io.js') - .content.content-alt + .content.content-alt#main-content .container(ng-cloak) .row .col-md-8.col-md-offset-2 diff --git a/services/web/modules/user-activate/app/views/user/register.pug b/services/web/modules/user-activate/app/views/user/register.pug index 90887765df..e83746c087 100644 --- a/services/web/modules/user-activate/app/views/user/register.pug +++ b/services/web/modules/user-activate/app/views/user/register.pug @@ -5,7 +5,6 @@ block entrypointVar block content - .content.content-alt + .content.content-alt#main-content .container #user-activate-register-container - \ No newline at end of file