Vue A11y represents a community-driven initiative focused on improving web accessibility within the Vue.js ecosystem. It is not a single, monolithic npm package but rather an umbrella organization (`@vue-a11y`) coordinating several specialized packages, tools, and guidelines designed to help developers build accessible Vue applications. Key projects under this umbrella include `@vue-a11y/announcer` for screen reader announcements, `@vue-a11y/skip-to` for keyboard navigation, `@vue-a11y/focus-loop` for managing focus traps, and `eslint-plugin-vuejs-accessibility` for linting a11y issues. While specific packages are actively maintained, the generic 'vue-a11y' name typically refers to the collective effort or an earlier, foundational concept that has since evolved into a modular approach. This modularity allows developers to pick and choose specific accessibility features as needed, supporting both Vue 2 and Vue 3 depending on the individual package. Release cadence varies per sub-package, but the community actively updates tools and resources to align with WCAG standards and Vue.js advancements.
npm install vue-a11yVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the use of `@vue-a11y/announcer` to provide dynamic screen reader announcements for content changes and navigation, crucial for single-page applications.
Identify required accessibility features and install the corresponding `@vue-a11y/*` package (e.g., `@vue-a11y/announcer`, `@vue-a11y/skip-to`). Review the documentation for each specific package.
Always check the specific `@vue-a11y/*` package's documentation or `package.json` for supported Vue versions. Often, Vue 3 versions are in `next` branches or separate releases.
Refer to the `eslint-plugin-vuejs-accessibility` documentation for the latest recommended configuration and rule details. Update your `.eslintrc.js` to extend `plugin:vuejs-accessibility/recommended` and address any linter warnings.
Supplement library usage with manual accessibility testing, including keyboard navigation and screen reader checks. Integrate tools like `@vue-a11y/vue-axe-next` for automated auditing during development and consult WCAG guidelines and WAI-ARIA authoring practices.
Install the specific `@vue-a11y/*` package you intend to use, e.g., `npm install @vue-a11y/announcer` or `yarn add @vue-a11y/announcer`.
Ensure `eslint-plugin-vuejs-accessibility` is installed (`npm install --save-dev eslint-plugin-vuejs-accessibility`) and configured in your `.eslintrc.js` with `extends: ['plugin:vuejs-accessibility/recommended']`. Check the plugin's documentation for the correct rule names.
Implement `@vue-a11y/announcer` for dynamic announcements and ensure proper focus management. For route changes, use a skip link and programmatically set focus to the main content area or the page title.