Skip to content

docs: Document how to propose axe-core rules#507

Merged
WilcoFiers merged 2 commits intodevelopfrom
rule-proposal
Sep 8, 2017
Merged

docs: Document how to propose axe-core rules#507
WilcoFiers merged 2 commits intodevelopfrom
rule-proposal

Conversation

@WilcoFiers
Copy link
Contributor

This PR is designed to do a few things:

  1. Streamline how rules get added. We shouldn't have people just creating PRs without discussing ahead of time the rules they are trying to add.
  2. Create a standard that we can use to document the rules in. This will help with the transparency of axe-core.
  3. Make it easier for us to take axe-core rules and propose them as WCAG ACT Rules.

Here are a few example rules the ACT Taskforce has developed for comparison: wilcofiers.github.io/act-rules/

2. If the element has an accessible name, return false
3. Otherwise return true

## Template
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template is missing a section for specifying tags, which you ask the submitter to supply in the section above.

Copy link
Contributor

@dylanb dylanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some suggestions for improving this document and/or related documents


There are two ways a rule written in the axe-core rule format can be transformed into the ACT Rules format:

## Method 1: Create a single rule
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best practices for rules should be added:

  1. Rules should only have one none check so that the error message is specific
  2. Rules should not combine any and none, these should be broken out into separate rules
  3. Checks should each only test a single specific case (either a passing technique or a single failing test)


All Github issues that propose a rule must be tagged as *rule*, and must use the following format:

### Intro
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a section for the message that would appear if the rule fails? This is what the user will see most of the time.

@WilcoFiers
Copy link
Contributor Author

Updated the PR based on @dylanb and @isner feedback.

Copy link
Contributor

@isner isner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@WilcoFiers WilcoFiers merged commit cabd329 into develop Sep 8, 2017
marcysutton pushed a commit that referenced this pull request Sep 8, 2017
* docs: Document how to propose axe-core rules

* fix(rule-proposal): Added best practice and rule help
@WilcoFiers WilcoFiers deleted the rule-proposal branch September 27, 2017 10:27
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