astro-paper icon indicating copy to clipboard operation
astro-paper copied to clipboard

Incorrect use of aria-labels

Open rogierv88 opened this issue 1 year ago • 2 comments

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.

rogierv88 avatar Feb 13 '24 10:02 rogierv88

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.

benjaminrae avatar Feb 13 '24 10:02 benjaminrae

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.

rogierv88 avatar Feb 13 '24 10:02 rogierv88

Thanks for pointing this out! This issue will be fixed in #346

satnaing avatar Aug 04 '24 07:08 satnaing