pa11y / pa11y-dashboard

Pa11y Dashboard is a web interface which helps you monitor the accessibility of your websites
https://pa11y.org
GNU General Public License v3.0
983 stars 181 forks source link

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

Open sunsnba opened 2 years ago

sunsnba commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.