fix: unhide hidden h1 title#936
Draft
jonathanp-okta wants to merge 3 commits into
Draft
Conversation
|
Preview URL https://next-jwt-qq267lfjo-okta.vercel.app |
|
Preview URL https://next-jwt-1s2287zm1-okta.vercel.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
Fixes a critical SEO issue on the home page: the
<h1>was rendered with a screen-reader-only clip pattern (visually_hidden), so it existed in the DOM but was invisible to users and absent from the above-the-fold visual render. SEO audits flagged this as a hidden H1.This change renders a single, visible
<h1>in the above-the-fold hero — where a primary heading is expected — following the same pattern already used by the introduction and libraries heroes (clsx(styles.title, getLocalizedSecondaryFont(languageCode))).Scope is limited to the home page hero: the common
HeroComponentis imported only by the home page, andhero.module.scssis its private stylesheet. No other pages, shared layout, or metadata are affected.Screenshots
References
Testing
This is a presentational/SEO fix with no logic changes, verified manually and via type-checking:
Manual verification: home page hero now displays a visible
<h1>; confirmed exactly one H1 exists in the DOM (no remainingvisually_hiddenheading).Locale check: run with Japanese enabled to confirm the H1 renders in both locales:
NEXT_PUBLIC_WITH_JAPANESE=enabled npm run dev/(English → "JSON Web Token (JWT) Debugger") and thejalocale (→ "JSON Web Token(JWT)デバッガー").This change adds test coverage for new/changed/fixed functionality
Checklist