Skip to content

There are accessibility problems with the sample code #12143

@debiru

Description

@debiru

📚 Subject area/topic

/tutorial/3-components/4

📋 Page(s) affected (or suggested, for new content)

https://docs.astro.build/en/tutorial/3-components/4/#build-a-hamburger-component

📋 Description of content that is out-of-date or incorrect

The following code is shown as an example of a hamburger component.

<div class="hamburger">
  <span class="line"></span>
  <span class="line"></span>
  <span class="line"></span>
</div>

The problematic code was added in #1089.

If the element is intended to be clicked, you should use the <button> element.

If such inappropriate markup is used as an example in official documentation, it may lead to the spread of incorrect implementation among readers.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

Not necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11yAnything to do with improving accessibilityhelp wantedIssues looking for someone to run with them!improve or update documentationEnhance / update existing documentation (e.g. add example, improve description, update for changes)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions