Skip to main content

Site Health issues and how to fix them

Learn about the HTML structure, link settings, and alt text issues that Site Health detects. For each issue, see what triggers it, how it affects your published site, and how to fix it.

This article explains what each Site Health issue means and how to fix it. Issues are grouped into three categories: HTML structure, link settings, and alt text.

To learn how to open and use Site Health, see Check your site for issues with Site Health.

HTML structure

These issues involve HTML tag settings and how elements are nested. They can prevent browsers and screen readers from correctly interpreting your page structure.

Point: Tags you set on boxes and text boxes are output as HTML on your published site. You can change a tag from [Tag] in the [Settings] tab of the right panel. For details, see HTML tag types and how to set them.

Heading structure issue

Heading levels are skipped.

  • Detected when: A heading level is skipped, such as an <h3> right after an <h1>. Headings inside rich text are included, and headings are checked in the order they appear on the page.

  • Impact: Headings should start at <h1> and go down one level at a time. When levels are skipped, screen readers can't correctly read the structure of the page.

  • How to fix: Change the flagged heading's tag to the correct level. Or, add the missing heading in between, or review the level of the previous heading.

Issues are combined into one per page. You can check the heading structure of the entire page within the issue.

Nested links and buttons

A link or button contains another interactive element.

  • Detected when: A link or button contains another link, button, input field, or select. Boxes with a link setting are also checked.

  • Impact: Click behavior can differ between browsers.

  • How to fix: Stop nesting the elements and place them side by side. If the inner element doesn't need to be a link, remove its link setting.

Block elements inside paragraphs or headings

A paragraph or heading contains a block element.

  • Detected when: A <p> or <h1>–<h6> contains a <div>, <section>, <ul>, <li>, or similar element.

  • Impact: Browsers automatically restructure the HTML, which can break the layout of your published site or change what screen readers read aloud.

  • How to fix: Move the flagged element outside the paragraph or heading.

An element other than <li> is directly under <ul>

A list has an element other than a list item directly under it.

  • Detected when: An element other than <li> is directly under a <ul> or <ol>.

  • Impact: Screen readers can't read it correctly as a list.

  • How to fix: Change the tag of the box directly under the list to <li>. Move elements that aren't list items outside the <ul>. If it doesn't need to be a list, change the parent tag to <div> or similar.

<li> is placed outside a <ul> or <ol>

A list item is placed outside a list.

  • Detected when: The parent element of an <li> is not a <ul> or <ol>.

  • Impact: Screen readers can't read it correctly as a list.

  • How to fix: Change the parent tag to <ul> or <ol>. If it doesn't need to be a list, change the <li> tag to <div> or similar.

Multiple <main> elements on the page

A page has two or more <main> elements, which mark the primary content of a page.

  • Detected when: A page has two or more <main> elements. The second and later ones are flagged.

  • Impact: A page can have only one <main> element.

  • How to fix: Change the flagged box's tag to <div> or similar.

Nested landmark elements

Landmark elements such as <header>, <footer>, and <main> are nested.

  • Detected when: A <main> is inside another <main>, or a <header> or <footer> is inside a <header> or <footer>.

  • Impact: Landmark elements can't be nested.

  • How to fix: Change the inner box's tag to <div> or similar.

Referenced component not found

A reference to a deleted component remains.

  • Detected when: An element references a component that has been deleted.

  • Impact: The element doesn't appear on your published site.

  • How to fix: Restore the referenced component. If you don't need it, delete the flagged element.

Link settings

These issues occur when the link destination of an element doesn't work correctly.

Point: For how to set up each type of link, see How to set up links.

Link destination isn't set correctly

The element has a link setting, but clicking it doesn't take you to the intended place. This issue is detected in any of the following cases.

Detected issue

Details and impact

Link destination is not set

The element has a link setting, but the destination is empty. The link doesn't go anywhere

Anchor ID not found on this page

A link in #id format points to an ID that no element on the same page has. The link doesn't move to the intended position

Invalid link format

The value doesn't match a page path, external URL, or modal (for example, hoge or example.com). It doesn't work as a link

Linked page not found

The specified page or modal doesn't exist on your site. The link is broken because the page was deleted, its path was changed, or it was mistyped

To fix the issue:

  • Set a valid link destination. Enter external URLs starting with https://.

  • If you don't need the link, remove the link setting.

For how to set an ID, see Setting an ID for a box (Anchor link).

Linked page is private

The linked page or modal is set to private.

  • Detected when: The linked page or modal is set to private.

  • Impact: The link can't be opened from your published site, resulting in a broken link.

  • How to fix: Publish the linked page or modal. Or, change the destination to a published page or modal. If you don't need the link, remove the link setting.

Alt text

These issues involve alt text, which conveys the content of an image.

Image alt text is not set

The image doesn't have alt text.

  • Detected when: The image's alt text is empty or contains only spaces.

  • Impact: The content of the image isn't conveyed to screen reader users or search engines.

If a box with a link setting contains only an image and no text, the image is treated as a "functional image." If a functional image has no alt text, the link itself has no name.

How to fix the issue depends on the role of the image.

Role of the image

How to fix

Image that conveys content

In the [Image] tab of the right panel, enter a description of the image in [Image alternate]

Decorative image

In the [Image] tab of the right panel, select [Treat as decorative]

Functional image

On the parent box that has the link setting, use [aria-label] to describe the link destination

Selecting [Treat as decorative] for a functional image doesn't resolve the issue, because the link itself still has no name.

Issues Site Health doesn't detect

Site Health doesn't currently detect the following. Check them in Live Preview or on your published site as needed.

  • HTML structure inside rich text (only the heading structure is checked)

  • Link destinations and image alt text inside rich text

  • Heading levels that go back up (for example, an <h2> after an <h3>)

  • Link destinations and headings connected to properties

  • Whether external URLs can actually be accessed

  • Images set to [Treat as decorative] (they are detected if they're inside a link or button)

  • Headings, images, and landmark elements inside elements with [aria-hidden] set

  • Structures that Studio generates automatically (such as links inside form labels)

Related articles

Did this answer your question?