Skip to content

Use h1 instead of h2 for page headings in default views - #5874

Open
SergiuLupaiescu wants to merge 1 commit into
heartcombo:mainfrom
SergiuLupaiescu:fix/h1-views
Open

SergiuLupaiescu wants to merge 1 commit into
heartcombo:mainfrom
SergiuLupaiescu:fix/h1-views

Conversation

@SergiuLupaiescu

@SergiuLupaiescu SergiuLupaiescu commented Oct 19, 2026 •

Copy link
Copy Markdown

Fixes #5873.

The generated view templates used <h2> as the top-level heading on every page, leaving no <h1> in the document outline. This affects screen reader navigation.
Updated all 14 default and simple_form_for templates to use <h1>.

@SergiuLupaiescu
SergiuLupaiescu marked this pull request as ready for review October 19, 2026 14:08
@aruprakshit

Copy link
Copy Markdown

Could the views use <h1> instead, with "Cancel my account" moving to <h2>? If that's too disruptive for apps that style the current markup, a config option would work too, e.g. config.heading_tag = :h1, defaulting to :h2 so nothing changes unless you opt in.

I agree with the reporter's suggestion to use a configuration approach. Predefining tags might be too restrictive for a broader audience, whereas configuration settings offer more flexibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Default views use <h2> for the page heading, so there's no <h1>

2 participants