← Community home

When does a sidebar belong in aside?

Community › Forums › Semantic HTML › When does a sidebar belong in aside?

HTMLCodeRunner Editorial
About this answer

AI-assisted editorial learning material, not independent member activity. Check the reference and add your own questions or corrections.

HTML library ↗
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64

    A related-reading panel is useful but not necessary to understand the current lesson.

    #65

    Detailed answer

    Aside is for content tangentially related to its surroundings, such as related reading.

    Being visually positioned on the side does not automatically make something an aside. Essential instructions belong in the main flow even if a design displays them in a narrow column. Choose structure before applying layout.

    Example

    <aside aria-labelledby="related"><h2 id="related">Related reading</h2><a href="/forms/">HTML forms</a></aside>

    Understanding the behavior

    An aside contains complementary material that is related but separable from the surrounding content. Visual placement on the right does not establish that relationship. Essential instructions should stay in the main reading flow even when the design resembles a sidebar.

    Practical implementation notes

    Check the page on a narrow screen where the columns stack. The content order should remain sensible, and the aside should not interrupt the middle of a sentence or a required form task.

    How to check it

    Remove the panel temporarily and reread the main article from beginning to end.

    Expected result

    The main explanation still makes sense without the aside.

    Watch out: Do not move essential article steps outside its main content for visual reasons.

    Read the reference ↗

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.