Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pa11y rules (array) to use only specific rules. #301

Open
sunsnba opened this issue Apr 27, 2022 · 2 comments
Open

Pa11y rules (array) to use only specific rules. #301

sunsnba opened this issue Apr 27, 2022 · 2 comments

Comments

@sunsnba
Copy link

sunsnba commented Apr 27, 2022

Expected behaviour

Ability to use custom rules

Actual behaviour

Errors no matter what rules I'm adding to the array. Evaluation failed: Error: Principle1.Guideline1_... is not a valid WCAG 2.1 rule.

Steps to reproduce

If task.standard === "custom name" set task.standard to "WCAG2AA" and set rules: [ "Principle1.Guideline1_3.1_3_1_AAA" ].

Environment

Testing in dev env...

Pa11y dashboard: 4.1.0
MongoDB: 5.0.7
Node.js: 14.9.1
@josebolos
Copy link
Member

Hi @sunsnba!

Thanks for creating this issue. The title of your issue mentions using only specific rules but this is not something that Pa11y Dashboard is able to do at the moment I'm afraid, Pa11y Dashboard is only able to ignore specific rules from the list of all rules available.

Are you describing a bug or an unexpected behaviour in Pa11y Dashboard, or are you asking for a new feature to be added?

@sunsnba
Copy link
Author

sunsnba commented Apr 27, 2022

Hi @josebolos!

Thank you for your quick reply! Good to know, given the rules section here (https://www.npmjs.com/package/pa11y#rules-array) it seemed like custom rules could be used so I thought this was a bug. To be sure, that means it's only possible to use WCAG2A, WCAG2AA or WCAG2AAA rules and just exclude certain rules? If that's the case then I'd definitely welcome the addition of a custom rules feature.

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

No branches or pull requests

3 participants