[Resolved] HERO and validator.w3.org problem

Home Forums Support [Resolved] HERO and validator.w3.org problem

Home Forums Support HERO and validator.w3.org problem

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1574231
    detanatar

    1) the validator shows that everything is fine
    2) deactivate the page title
    3) create a Header element
    4) <h1 class = “entry-title” itemprop = “headline”> {{post_title}} </h1>
    5) activate it for the whole site
    6) the validator shows an error Warning: Article lacks heading. —- Consider using h2-h6 elements to add identifying headings to all articles.

    #1574295
    detanatar

    such an error occurs probably because the original H1 is located at the same level as

    <article id=”post-2″ class=”post-2 page type-page status-publish has-post-thumbnail” itemtype=”https://schema.org/CreativeWork&#8221; itemscope>

    and has the following form

    <article id=”post-2″ class=”post-2 page type-page status-publish has-post-thumbnail” itemtype=”https://schema.org/CreativeWork&#8221; itemscope>

    <header class=”entry-header”>
    <h1 class=”entry-title” itemprop=”headline”>CONTENT</h1>
    </header>

    if you insert an H1 element, then it is inserted above

    <article id=”post-2″ class=”post-2 page type-page status-publish has-post-thumbnail” itemtype=”https://schema.org/CreativeWork&#8221; itemscope>

    #1574314
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to a page where i can see the validation issue?

    #1574320
    detanatar

    sent access
    main page

    #1574467
    detanatar

    a validation error occurs when integrating your H1

    #1574518
    David
    Staff
    Customer Support

    It doesn’t look like your page has any other headings e.g H2 to H6 which seems to be main issue. Have you tried including a H2 in your content ?

    #1574546
    detanatar

    when you turn on H2, the error disappears.
    BUT
    With the default H1, there is no error in the absence of other headers

    enabling H2 header masks the problem but does not solve

    #1574594
    David
    Staff
    Customer Support

    If you use the Header element to display the <h1> post title then yes, it moves it outside of the article tag, this is a user design choice. If you want to maintain the H1 inside your content then you need to remove the H1 post title from the header element.

    But the simple fix is to include better heading structure in your content which is why the validator suggests Consider using h2-h6 elements to add identifying headings to all articles.

    #1574601
    detanatar

    Thank you David.
    I will take into account the future

    #1575046
    David
    Staff
    Customer Support
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.