• Resolved Karis

    (@askel45)


    Hi. Web Aim is reporting the site title as follows “Text appears to be a heading but is not a heading element.” This happens outside of homepage on all pages except the homepage.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi there,

    If your home page is set to display the latest posts the Site Title is set to <h1> as there is no Content Title. Which is why it doesn’t get flagged.

    If you want to eliminate that alert then the simple solutions are: 1. reduce the site title font size and remove any bold/italics style or 2. use a logo in place of the site title.

    • This reply was modified 5 years, 7 months ago by David.
    Thread Starter Karis

    (@askel45)

    I tried this method but it did not work.

    Have you added a Logo to your Site Identity ? As that is required for that filter to work.

    Thread Starter Karis

    (@askel45)

    Nope! Is there a filter where I can replace site name with inline SVG logo?

    All you need to do is add an Image to the Site Identity logo – it can just be 1 pixel. The filter will then return your SVG in its place.

    Thread Starter Karis

    (@askel45)

    Okay. It worked! So the image I put there is not loaded at all? And only the SVG is loaded? (Changing font size was not practical since the site title is only 20px.)

    Thread Starter Karis

    (@askel45)

    Now the page is missing an H1 tag after using that filter.

    See this topic – it has a condition on the filter so you can wrap the logo in H1 on the home page.

    https://generatepress.com/forums/topic/h1-for-homepage-logo/#post-1161994

    Thread Starter Karis

    (@askel45)

    It worked. Thanks.

    Glad to hear that

    Thread Starter Karis

    (@askel45)

    @diggeddy I am now getting an error that “A heading contains no content.” in webaim after using the code above. Is there a way to correct this?

    Nope – the only logical way around those flags is to remove the H1 wrapper from the Logo. Then add a H1 Title to your front page.

    Thread Starter Karis

    (@askel45)

    I did that and then set it to ‘display:none”. Set it to show before the header. Setting it in wp_head causes the favicon to disappear.

    The wp_head should not be used for adding content.
    Try the before_header hook.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Accessibility issue with site title’ is closed to new replies.