npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

skip-tot

v2.1.2

Published

It helps people who only use the keyboard to jump to what matters most.

Downloads

74

Readme

vue-skip-to


🔥 HEADS UP! You are in the Vue 2 compatible branch, check the branch for Vue 3 support.


Helps people who only use the keyboard to jump to what matters most

The population grows very fast nowadays and with that the number of visually impaired increases as well. Did you know that we have over 350 million visually impaired people in the world?

However, we are responsible for doing our utmost to make our applications usable and accessible to everyone.

"Skip to content" or "skip to a section" of your site is one of the most common accessibility techniques today, but not as used as it should be.

This pattern is detailed in the Techniques for WCAG 2.0 in notes G1 and G124, and also served as the inspiration for creating this component.

Check out the live demo!

Installation

// npm
npm install -S @vue-a11y/skip-to

// yarn
yarn add @vue-a11y/skip-to

Usage

Vue SFC

// main.js

import Vue from 'vue'
import VueSkipTo from '@vue-a11y/skip-to'

Vue.use(VueSkipTo)

new Vue({
  //...
})
// App.vue

<template>
  <div id="app">
    <VueSkipTo to="#main" label="Skip to main content" />

    <!-- header, navigation, and more -->

    <main id="main">
      <!-- content -->
    </main>
  </div>
</template>

<script>
export default {
  name: 'app'
  components: {
    Logo,
    VueSkipTo,
  },
  //...
}
</script>

Skip-to list

To use multiple links, set an array into the to prop with the following shape:

[
  {
    "anchor": "<STRING>", // destination id
    "label": "<STRING>" // link text
  }
  //...
]
// App.vue

<template>
  <div id="app">
    <vue-skip-to
      list-label="Skip to"
      :to="[
        { anchor: '#main', label: 'Main content' },
        { anchor: '#footer', label: 'Footer' },
      ]"
    ></vue-skip-to>

    <!-- header, navigation, and more -->

    <main id="main"></div>

    <footer id="footer"></div>
  </div>
</template>

In HTML files

<!--omitted -->
  <script src="https://unpkg.com/vue"></script>
  <script src="https://unpkg.com/@vue-a11y/skip-to"></script>
</head>
<body>
  <div id="app">
    <vue-skip-to to="#main"></vue-skip-to>

    <!-- header, navigation, and more -->

    <main id="main">
      <!-- content -->
    </main>
  </div>

  <script>
    new Vue({
      el: "#app"
    })
  </script>
</body>
</html>

Props

| Prop | Data Type | required | Description | Default | | ------------ | --------------- | -------- | ----------------------------------------------------------------- | ---------------------- | | to | String | Array | false | Destination ID or array of destination objects | '#main' | | label | String | false | Skip link text content | 'Skip to main content' | | list-label | String | false | Skip link list label text | 'Skip to' |

Support route change

@vue-a11y/skip-to checks if you are using the vue-router, watches changes to $route.path and send focus to the vue-skip-to wrapper.

Recommendation: To make more sense, use the VueSkipTo component right after the root element of your app.

Read more about accessible routing:

Custom styling

Override the default styles by targeting the following:

.vue-skip-to {
}
.vue-skip-to__link {
}
.vue-skip-to__nav {
}
.vue-skip-to__nav-list {
}
.vue-skip-to__nav-list-item {
}

Running tests

git clone https://github.com/vue-a11y/vue-skip-to.git
npm install
npm run dev
npm run test:e2e

Or run Cypress on interactive mode

npm run test:e2e:open

About

This component was inspired by this article.

  • This component working in all modern browsers and IE9;
  • Ensures that the target element receives focus, even if it is not a tag that naturally receives focus as the tag input and a. In this case, the div are also given the focus and the tabindex attribute with the value of -1;
  • Add focus to the destination, even when the address bar already has the corresponding hash;

Contributing

  • From typos in documentation to coding new features;
  • Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found;
  • Fork repository, make changes and send a pull request;

Follow us on Twitter @vue_a11y

Thank you