accessible-astro-components icon indicating copy to clipboard operation
accessible-astro-components copied to clipboard

Allow "Skip to Navigation" to be omitted

Open iansjk opened this issue 2 years ago • 1 comments

Hi there!

I noticed that the accessible-astro-starter template uses this library of yours to render skip links. I also noticed there's two of them:

  • Skip to navigation
  • Skip to main content

But on the deployed version of accessible-astro-starter, tabbing from initial page load lands on Skip to navigation, which when activated only skips 1 item (the Skip to main content link).

Could the Skip to navigation piece be optionally omitted? I'm going by the WebAIM advice that multiple skip links are usually unnecessary, and in the case of the starter template, we're only skipping past 1 item. (This would also require not rendering a list, since it would only have a single link in it.)

Would appreciate your thoughts. Thanks!

iansjk avatar Aug 13 '22 04:08 iansjk

Hey @iansjk!

Thanks for submitting the issue 🙂 In all honesty, it has been on my mind to simplify the skip links for the exact reason you're giving in your example. It had been a single skip link some time ago when the component was still part of the starter template itself. Upon moving it to this separate component library, I thought it would make sense to provide a more broad usage of the component by also adding the skip to navigation (for more complex projects). I also noticed that upon moving it to a library the need would arise to include an option to emit the skip to navigation part, but that's where my time ran a little short at the time.

So taking all that in consideration, I think the best thing to do is to convert the component to have just the skip link to the content and remove the rendered list, that would serve most cases anyway 🙂

I'm having very little time available to work on the projects lately, but I'll get to them eventually! Thanks again @iansjk.

markteekman avatar Aug 14 '22 17:08 markteekman