Skip to content

Conversation

@SkullShoT007
Copy link
Contributor

Updated the main heading of the page to use an

element instead of a lower-level heading to meet accessibility standards.

Description

The main heading was not using an

, which is required for proper semantic structure and accessibility. This change ensures screen readers and assistive technologies can correctly interpret the page structure.

Motivation and Context

This change is required to improve accessibility by ensuring the main page heading uses an

element.
Without this, screen readers and other assistive technologies may not correctly interpret the page structure.

Fixes #10480

How Has This Been Tested?

Ran the code in development mode and verified that the main heading is now using an

tag by inspecting it in the browser's developer tools under the panel. Checked that the page layout and styling remain intact.

Screenshots (if appropriate):

image

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@glowcloud
Copy link
Contributor

Hi @SkullShoT007,

Thanks for providing this fix! We also have a separate component for info in OpenAPI 3.1.0 specifications - could you also change the heading to h1 there?

@SkullShoT007
Copy link
Contributor Author

Sure!

@SkullShoT007
Copy link
Contributor Author

hi!. I have done the needed change in seperate component in OpenAPI 3.1.0 specification

@glowcloud
Copy link
Contributor

glowcloud commented Oct 9, 2025

Thanks for the update, @SkullShoT007! Looks like we have a few tests where we try to find the title by h2, seems to be only h2.title. These tests also need to be updated to use h1.title.

@SkullShoT007
Copy link
Contributor Author

oh, Thanks for the feedback, I will look into it

@SkullShoT007
Copy link
Contributor Author

I have updated the tests now, its now h1.title instead of h2.title

Copy link
Contributor

@glowcloud glowcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @SkullShoT007, LGTM now!

@glowcloud glowcloud merged commit c0bd7b6 into swagger-api:master Oct 9, 2025
8 checks passed
swagger-bot pushed a commit that referenced this pull request Oct 10, 2025
## [5.29.4](v5.29.3...v5.29.4) (2025-10-10)

### Bug Fixes

* **core:** refactor UNSAFE_ lifecycle methods in ContentType and OperationContainer ([#10373](#10373)) ([2814709](2814709)), closes [#10212](#10212)
* ignore rendering responses with extensions in the schema ([#10592](#10592)) ([23e3e00](23e3e00))
* include script in body ([#10593](#10593)) ([456274c](456274c))
* update vulnerable libxml2 to 2.13.9-r0 ([#10600](#10600)) ([8138154](8138154))
* use h1 for title heading to improve accessibility ([#10598](#10598)) ([c0bd7b6](c0bd7b6)), closes [#10480](#10480)
@swagger-bot
Copy link
Contributor

🎉 This PR is included in version 5.29.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a11y: Page should start with a level 1 heading

3 participants