Skip to content

Keep heading levels in order (fix #181) - #501

Merged
stephaniehobson merged 1 commit into
mainfrom
181--heading-order
Nov 12, 2026
Merged

stephaniehobson merged 1 commit into
mainfrom
181--heading-order

Conversation

@stephaniehobson

Copy link
Copy Markdown
Collaborator

Replaces #475, which was approved but merged into react-18-upgrade after that branch had already merged into main, so its change never reached main. This is the same commit, rebased onto main without conflicts.

One-line summary

Fix the heading levels that skip on /contact and on dashboards that have no Summary section.

Significant changes and points to review

  • Contact.jsx: add a visible "Contact" h2. Before this, the page went from the site h1 straight to the footer's h3s.
  • Dashboard.styl: hide the "Metrics" h3 visually instead of with display: none. Screen readers skipped it, so on User Activity and Usage Behavior the metric h4s followed the h2 directly.
    • Hardware wasn't affected, because its visible "Summary" h3 comes first.
  • contact.spec.js: check the new heading.
  • axe's heading-order check now passes on /, /contact, all three dashboards, and the 404 page.

Issue / Bugzilla link

#181

Testing

Run npm start first.

  • Open http://localhost:3000/contact and check a "Contact" heading appears above the email paragraph.
  • Open http://localhost:3000/dashboard/user-activity and check the layout hasn't changed. "Metrics" should not be visible.
  • With a screen reader or the browser's accessibility tree, check "Metrics" appears as a level-3 heading on that dashboard.

@stephaniehobson

Copy link
Copy Markdown
Collaborator Author

Approved as #475 but then its merge when sideways.

@stephaniehobson
stephaniehobson merged commit b39bdfc into main Nov 12, 2026
7 checks passed
@stephaniehobson
stephaniehobson deleted the 181--heading-order branch November 12, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant