Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Home link should have an accessible name #1714

Closed
1 task
obulat opened this issue Aug 20, 2022 · 0 comments · Fixed by #1721
Closed
1 task

Home link should have an accessible name #1714

obulat opened this issue Aug 20, 2022 · 0 comments · Fixed by #1721
Labels
♿️ aspect: a11y Concerns related to the project's accessibility ✨ goal: improvement Improvement to an existing user-facing feature 🟧 priority: high Stalls work on the project or its dependents

Comments

@obulat
Copy link
Contributor

obulat commented Aug 20, 2022

Problem

Currently, the home link has accessible name only on the home page of size md and above:

<VLink
href="/"
class="relative -left-[6.25rem] hidden rtl:-right-[6.25rem] lg:block"
>
<h1>
<span class="sr-only">Openverse</span>
<!-- width and height chosen w.r.t. viewBox "0 0 280 42" -->

In the header has no accessible name. Instead of saying the home page, Voice Over reads out all of the URL.
Screen Shot 2022-08-20 at 2 42 27 PM

Lighthouse shows the following error:
Screen Shot 2022-08-20 at 2 43 48 PM

Description

According to W3C1, we should add an alt text to the Openverse logo <img> element saying "Openverse home".

Alternatives

GitHub uses an aria-label="Homepage" on the <a> link, and makes the image aria-disabled.
MDN also uses aria-label on the <a> element.
Ariakit uses a span with text "Reakit" that's clipped to a size of 1x1px inside of the <a> element that also has aria-current="page".

Additional context

Implementation

  • 🙋 I would be interested in implementing this feature.

Footnotes

  1. https://www.w3.org/WAI/tutorials/images/functional/#example-1-image-used-alone-as-a-linked-logo

@obulat obulat added 🟧 priority: high Stalls work on the project or its dependents ✨ goal: improvement Improvement to an existing user-facing feature ♿️ aspect: a11y Concerns related to the project's accessibility labels Aug 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
♿️ aspect: a11y Concerns related to the project's accessibility ✨ goal: improvement Improvement to an existing user-facing feature 🟧 priority: high Stalls work on the project or its dependents
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant