eleventy-navigation icon indicating copy to clipboard operation
eleventy-navigation copied to clipboard

Title attribute absent for accessibility

Open inetbiz opened this issue 2 years ago • 6 comments

I propose the eleventyNavigation use the title attribute to also create the HTML title attribute. It's not perfect. Som screen readers will override with aria-label if present. https://developers.google.com/web/fundamentals/accessibility/semantics-aria/aria-labels-and-relationships. IF the title attribute is present in a link, the screen reader will use it. eleventyNavigation with title

inetbiz avatar Mar 16 '22 21:03 inetbiz

This should also be included in the eleventyNavigationBreadcrumb function.

inetbiz avatar Mar 16 '22 21:03 inetbiz

I would consider these enhancements to be urgent. Considerations for the needs of those whom are impaired.

inetbiz avatar Mar 16 '22 21:03 inetbiz

Out of curiosity, where would you imagine the title attribute be added? Adding the title or aria-label attribute to a link when plain text is provided is irrelevant and not recommended.

For example: Use this: <a href="#">All of the mammals</a>

Not this: <a href="#" title="All of the mammals">All of the mammals</a>

rileymacisaac avatar Mar 18 '22 14:03 rileymacisaac

The whole reason for adding title or ARIA-label are for screen readers; for the visually impaired.

inetbiz avatar Mar 18 '22 14:03 inetbiz

I'm a certified accessibility professional, and I understand where you are coming from, but I'm trying to communicate that adding titles and/or aria-labels with the same value as text already provided in the HTML provides no extra value to a screen reader or other assistive tech.

All you need to communicate a link is text in the anchor.

If you'd like to add additional attributes or roles you can always render the navigation manually.

rileymacisaac avatar Mar 18 '22 18:03 rileymacisaac

Not all Links contain the text. Examples are Links that may say, "Here" or "More".

inetbiz avatar Mar 30 '22 15:03 inetbiz