satnaing / astro-paper

A minimal, accessible and SEO-friendly Astro blog theme
https://astro-paper.pages.dev/
MIT License
2.13k stars 440 forks source link

Incorrect use of aria-labels #263

Open rogierv88 opened 4 months ago

rogierv88 commented 4 months ago

Some elements have aria-labels that can not have these labels. Aria labels should only be applied on interactive elements or HTML landmarks. As far as I could find this applies to the 404 h1 element and the disabled version of the LinkButton element.

benjaminrae commented 4 months ago

As far as I can see this use of aria-label is valid according to https://w3c.github.io/aria/#aria-label

However as it says title may be preferred but would create a tooltip, or even aria-labelled-by.

rogierv88 commented 4 months ago

As stated on https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label, the aria-label should only be used on interactive elements or HTML landmarks. Which is not the case for an h1 or span element.