Skip to content

Enable Vue accessibility linting via eslint-plugin-vuejs-accessibility #14637

@rtibbles

Description

@rtibbles

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Enable eslint-plugin-vuejs-accessibility in packages/kolibri-format/eslint.config.mjs using the flat/recommended preset at error severity, and remediate the pre-existing violations across the ~612 .vue files in the Kolibri codebase. Includes a minor version bump of kolibri-format.

Complexity: High
Target branch: develop

Context

Kolibri has ~612 .vue files but no static accessibility linting today. The Kolibri Design System components (KButton, KModal, etc.) already bake in a11y best practices, but consumer templates can still regress — missing alt text on <img>, interactive <div> without keyboard handlers, labels without associated inputs, unlabelled form controls, and so on.

eslint-plugin-vuejs-accessibility is a static subset of a11y checks. It does not replace runtime/visual audits (screen readers, axe-style tooling), but it catches the most common template-level mistakes at lint time.

kolibri-format (the shared ESLint config at packages/kolibri-format/eslint.config.mjs) is the correct place to add the plugin so both the Kolibri repo and external consumers get the rules.

The Change

Add eslint-plugin-vuejs-accessibility as a dependency of kolibri-format and register it in packages/kolibri-format/eslint.config.mjs:

  • Extend the flat/recommended preset.
  • Raise any rules in the preset that ship at warn to error, so they are consistent with the rest of the Kolibri lint config.

Remediate the resulting violations across all .vue files in the Kolibri codebase.

Bump kolibri-format to a new minor version.

How to Get There

After wiring the plugin and preset, run:

pnpm run lint-frontend:format

Most vuejs-accessibility rules have no autofixer — remediation is manual: adding alt attributes, keyboard event handlers alongside click handlers, for/id wiring on labels, aria-* where semantically appropriate, and so on. Where a violation cannot be fixed without redesign (e.g. a complex custom widget missing role semantics), flag it in the PR discussion rather than silencing with an inline disable.

Out of Scope

  • Runtime a11y testing (axe-core, manual screen-reader passes).
  • Visual/contrast audits.
  • Adding or enabling rules beyond the flat/recommended preset.
  • Redesigning components whose a11y problems can't be fixed at the template level — flag these for follow-up issues rather than resolving them here.

Acceptance Criteria

  • eslint-plugin-vuejs-accessibility is added as a dependency of kolibri-format
  • The flat/recommended preset is registered in packages/kolibri-format/eslint.config.mjs
  • Any preset rules that default to warn are raised to error
  • pnpm run lint-frontend passes with no new violations across the repo
  • Violations that cannot be fixed at the template level have follow-up issues filed rather than being silenced with inline disables
  • kolibri-format has a minor version bump in its package.json
  • pnpm-lock.yaml is updated for the version bump

References

AI usage

Used Claude Code to draft this issue iteratively. I provided direction on scope and reviewed each section before it was committed. Claude scanned the codebase to gauge the number of .vue files in scope for remediation (~612 files).

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions