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

fix(docs/rules): add missing category tags to rules metadata #2569

Merged
merged 2 commits into from
Oct 21, 2020
Merged

fix(docs/rules): add missing category tags to rules metadata #2569

merged 2 commits into from
Oct 21, 2020

Conversation

mDalessandro
Copy link
Contributor

@mDalessandro mDalessandro commented Oct 20, 2020

Add category tags to the rules that were missing them.
Add validation to check during a build for the inclusion of a category on the rule metadata.

Newly added categories for rules which were missing them:

aria-input-field-name: cat.aria
aria-toggle-field-name: cat.aria
aria-tooltip-name: cat.aria
avoid-inline-spacing: cat.structure
identical-links-same-purpose: cat.semantics
label-content-name-mismatch: cat.semantics
no-autoplay-audio: cat.time-and-media
scrollable-region-focusable: cat.keyboard

Let me know if you have a different thought on which categories should be used for these rules. Because there's no description of the categories themselves, it wasn't clear which one should be used; for example, both cat.semantics and cat.structure seemed to have some overlap. That could probably be a new gihub issue if anyone else feels similarly.

Closes issue #2554

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

Add category tags to the rules that were missing them.
Add validation to check during a build for the inclusion of a category on the rule metadata.

Closes issue #2554
@mDalessandro mDalessandro requested a review from a team as a code owner October 20, 2020 08:20
@CLAassistant
Copy link

CLAassistant commented Oct 20, 2020

CLA assistant check
All committers have signed the CLA.

@@ -2,7 +2,7 @@
"id": "accesskeys",
"selector": "[accesskey]",
"excludeHidden": false,
"tags": ["best-practice", "cat.keyboard"],
"tags": ["cat.keyboard", "best-practice"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I swapped the positioning here to better match the order of the other rules' tags.

Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

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

Look great! Just want @WilcoFiers to verify the categories are correct as he knows them best.

@@ -198,6 +198,10 @@ function createSchemas() {
type: 'array',
items: {
type: 'string'
},
conform: function hasCategoryTag(tags) { return tags.some(tag => tag.includes('cat.')) },
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice. I like this check. Thanks for adding this.

@straker straker added the hacktoberfest Help contribute during the month of October to participate https://hacktoberfest.digitalocean.com/ label Oct 20, 2020
@straker
Copy link
Contributor

straker commented Oct 20, 2020

@mDalessandro so we merged a new rule and now this pr has a conflict. Sorry about that. Would you mind merging the latest develop to resolve the conflict?

@WilcoFiers
Copy link
Contributor

@straker no need. It's an easy fix. I've sorted it.

@WilcoFiers WilcoFiers merged commit 285c442 into dequelabs:develop Oct 21, 2020
@mDalessandro mDalessandro deleted the fix/add-missing-category-tags branch October 22, 2020 02:17
@mDalessandro
Copy link
Contributor Author

Awesome, thanks for taking care of that. I haven't had a chance to sit down and do it, so that was helpful.

I'll keep an eye out for any other issues I could work on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Help contribute during the month of October to participate https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants