Skip to content

[Accessibility/SEO] Multiple H1 tags and improper heading hierarchy on homepageΒ #227

Closed

Description

@im-anishraj

🐞 Issue: Multiple H1 tags and improper heading hierarchy

πŸ“ Location

Homepage: aboutcode.org

❌ Problem

While auditing the site's DOM structure, I identified that the homepage contains two <h1> elements, which violates semantic HTML best practices and accessibility standards.

  • WCAG Violation: This violates WCAG 2.1 Success Criterion 1.3.1 (Info and Relationships). Assistive technologies use the <h1> as the primary landmark to define a page's purpose. Multiple <h1> tags create ambiguity for screen reader users.
  • SEO Impact: Search engines prioritize the <h1> to understand page relevance. Having more than one can dilute keyword ranking and confuse crawlers.
  • Improper H2 Usage: There are nine <h2> tags present, many of which appear to be used for visual font sizing rather than defining logical content sections.

πŸ” Steps to Reproduce

  1. Navigate to the aboutcode.org homepage.
  2. Open the browser DevTools Console.
  3. Run the following command: document.querySelectorAll('h1, h2').length.
  4. Observe that it returns 11 total elements (2 for H1, 9 for H2).
  5. Check the specific H1s: document.querySelectorAll('h1').forEach(el => console.log(el.innerText)).
    • Result: One is the main title, and the other is the animated typing headline.

βœ… Expected Behavior

  • There should be exactly one <h1> on the page that defines the core value proposition.
  • The animated "typing" text should be a <div> or <span> styled to look large but semantically neutral.
  • <h2> and <h3> tags should follow a strict, descending logical order.

πŸ’‘ Suggested Fix

  • Keep the primary brand title as the sole <h1>.
  • Demote the animated Elementor headline from an <h1> to a <div> or <p> with a specific CSS class for styling.
  • Review the nine <h2> tags and convert those used only for styling into standard text elements with CSS classes.

🌟 Impact

  • Accessibility: Provides a single, clear landmark for users of screen readers.
  • Maintainability: Cleans up the Elementor-generated heading clutter.
  • SEO: Strengthens the primary keyword focus for the homepage.

Note: I am a BTech Computer Science student and open-source contributor. I am interested in improving web accessibility and would be happy to help locate the specific templates to submit a PR for this fix!

Activity

  1. dhiraj-143r commented on Dec 21, 2025

    @dhiraj-143r

    I am interested to work on this will u plz assign me this issue

  2. A1shalia commented on Dec 22, 2025

    @A1shalia

    @anish-devgit I would be willing to submit a fix for this issue.

  3. dhiraj-143r commented on Dec 23, 2025

    @dhiraj-143r

    I am working on it.

  4. pranav5105 commented on Dec 24, 2025

    @pranav5105

    I am working on it.

    does he assigned it to you

  5. pranav5105 commented on Dec 24, 2025

    @pranav5105

    hey @anish-devgit i understood the issue.Recently i solved this issue in my college project.Using of many h1 tags in single page can make difficulties to understand speccialy for visually impaired persons.So i will be able to solve this problem in neat manner,please let me know if i can take it up

  6. devprashant19 commented on Dec 24, 2025

    @devprashant19

    Hi There. I would like to work on this issue. Please assign it to me.
    My approach is as follows-

    1. I'll audit the homepage DOM to identify all <h1>–<h2> elements and map them to actual content sections versus purely visual headings.
    2. I'll then retain a single <h1> for the primary brand/value proposition and demote the animated typing headline to a <div> or with an appropriate CSS class.
    3. Refactor the nine <h2> tags by preserving only those that introduce real sections and converting decorative ones into semantic-neutral elements styled via CSS.
    4. Then enforce a strict heading hierarchy (<h1> β†’ <h2> β†’ <h3>) to accurately reflect content structure.
    5. Finally re-run SEO and accessibility audits to confirm improved clarity, crawlability, and maintainability.
  7. im-anishraj commented on Dec 25, 2025

    @im-anishraj
    Author

    Thanks everyone for the interest πŸ™Œ
    Since I opened this issue, I’ll be working on the fix and will submit a PR soon.

    If maintainers prefer someone else to take this up, please let me know.

  8. AnikeshAnilkumarLathe commented on Jan 21, 2026

    @AnikeshAnilkumarLathe

    I would like to work on this issue.

  9. gyanranjanpanda commented on Feb 7, 2026

    @gyanranjanpanda

    I've created a fix for this issue in the Docusaurus-based website repository (aboutcode-org/www.aboutcode.org).

    PR: aboutcode-org/www.aboutcode.org#126

    The fix ensures:

    • Single H1 tag per page ("Welcome to AboutCode.org")
      • Proper heading hierarchy with H2 section headings
        • WCAG 2.1 compliance (Success Criterion 1.3.1)
          • Improved SEO with clear primary heading
            Note: This fixes the new Docusaurus site. The live WordPress site at aboutcode.org will need a separate fix via CMS admin access.
  10. mjherzog commented on Feb 26, 2026

    @mjherzog
    Member

    Closing because the WordPress version of this website will be replaced by the content from https://aboutcode-org.github.io/www.aboutcode.org/ very soon.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions