eleventy-navigation
eleventy-navigation copied to clipboard
Title attribute absent for accessibility
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.
This should also be included in the eleventyNavigationBreadcrumb
function.
I would consider these enhancements to be urgent. Considerations for the needs of those whom are impaired.
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>
The whole reason for adding title or ARIA-label are for screen readers; for the visually impaired.
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.
Not all Links contain the text. Examples are Links that may say, "Here" or "More".