Skip to content

Add skip-link visibility rule and validator (issue #23)Feature/skip link visibility 23#53

Open
juanscasado wants to merge 3 commits intocvs-health:mainfrom
juanscasado:feature/skip-link-visibility-23
Open

Add skip-link visibility rule and validator (issue #23)Feature/skip link visibility 23#53
juanscasado wants to merge 3 commits intocvs-health:mainfrom
juanscasado:feature/skip-link-visibility-23

Conversation

@juanscasado
Copy link

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.
'''

@jrpool
Copy link
Contributor

jrpool commented Dec 6, 2025

Thank you for your valuable contributions, @juanscasado. These rules seem very appropriate and useful.

As of 1 October 2025, the active fork of testaro has migrated from this cvs-health organization to jrpool, by agreement with CVS Health. Nobody now has the authority to merge pull requests in cvs-health/testaro. I would be grateful if you would kindly resubmit these three pull requests at jrpool/testaro. That fork is 125 commits ahead of this original repository.

In jrpool/testaro, I am working on a more performant pattern for testaro tests that concentrates the logic in the page context and may execute rapidly enough to eliminate the need for sampling. I have implemented this pattern so far on the adbID, allHidden, bulk, and lineHeight tests. If you wish to try it on your three new tests, you are welcome to do that, and then I hope you will comment on whether you consider it an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants