Add skip-link visibility rule and validator (issue #23)Feature/skip link visibility 23#53
Conversation
…s styled as buttons (issue cvs-health#21)
…nitial focus is not on the first focusable element (issue cvs-health#22)
|
Thank you for your valuable contributions, @juanscasado. These rules seem very appropriate and useful. As of 1 October 2025, the active fork of In |
This PR adds a new accessibility rule, skipLinkVisibility, to Testaro. The rule detects deficiencies in the visibility of skip-links (in-page navigation links), reporting when:
A skip-link is never visible, even when focused.
A skip-link is only visible on focus but does not meet minimum recommended size or contrast.
Changes included:
New rule: skipLinkVisibility.js
Validator configuration: skipLinkVisibility.json
Test page: index.html
Documentation update: Section added to README.md describing the rule and its purpose.
Motivation:
This rule helps ensure compliance with WCAG accessibility requirements for keyboard navigation and skip-link visibility, improving the experience for keyboard and screen reader users.
Example output:
'''
Skip-link 'skip to main content (never visible)' is never visible, even when focused.
Skip-link 'skip to main content (visible on focus)' is only visible when focused, but does not meet minimum contrast or size.
'''