Skip to content

Add aria-label="Toggle menu" to mobile menu toggle button for improved accessibility #21

@MohamadSalman11

Description

@MohamadSalman11

Before You Submit

Describe the issue

The mobile menu toggle <button> has aria-expanded and aria-controls attributes, but does not include an aria-label.
Including aria-label="Toggle menu" will help screen readers better describe the button’s function, improving accessibility.

Current code snippet:

<button
  aria-expanded={open}
  aria-controls="mobile-menu"
  onClick={() => setOpen(!open)}
  className="block py-3 text-xl text-grey lg:hidden"
>

Recommended update:

<button
  aria-expanded={open}
  aria-controls="mobile-menu"
  aria-label="Toggle menu"
  onClick={() => setOpen(!open)}
  className="block py-3 text-xl text-grey lg:hidden"
>

Corresponding file: Header.tsx

Note: This issue is a great starting point for new contributors and is marked as a "good first issue." If you’ve contributed before, please consider looking for other issues without this label.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions