Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
[Issue #211,#212,#213,#214,#215,#216] updated a11y rule metadata to h…
Browse files Browse the repository at this point in the history
…ave Accessibility group
  • Loading branch information
HamletDRC committed Sep 2, 2016
1 parent 311d69a commit 5ba18c4
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 30 deletions.
12 changes: 6 additions & 6 deletions recommended_ruleset.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ module.exports = {
"ordered-imports": true,
"prefer-array-literal": true,
"prefer-const": true,
"react-a11y-img-has-alt": true,
"react-a11y-props": true,
"react-a11y-role": true,
"react-a11y-role-has-required-aria-props": true,
"react-a11y-role-supports-aria-props": true,
"react-a11y-tabindex-no-positive": true,
"typedef": [true, "callSignature", "indexSignature", "parameter", "propertySignature", "variableDeclarator", "memberVariableDeclarator"],
"underscore-consistent-invocation": true,
"variable-name": true,
Expand All @@ -142,8 +136,14 @@ module.exports = {
* Accessibility. The following rules should be turned on to guarantee the best user
* experience for keyboard and screen reader users.
*/
"react-a11y-img-has-alt": true,
"react-a11y-lang": true,
"react-a11y-meta": true,
"react-a11y-props": true,
"react-a11y-role": true,
"react-a11y-role-has-required-aria-props": true,
"react-a11y-role-supports-aria-props": true,
"react-a11y-tabindex-no-positive": true,
"react-a11y-titles": true,

/**
Expand Down
3 changes: 1 addition & 2 deletions src/reactA11yImgHasAltRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ export class Rule extends Lint.Rules.AbstractRule {
issueType: 'Warning',
severity: 'Important',
level: 'Opportunity for Excellence',
group: 'Clarity',
commonWeaknessEnumeration: '398, 710'
group: 'Accessibility'
};

public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
Expand Down
3 changes: 1 addition & 2 deletions src/reactA11yPropsRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export class Rule extends Lint.Rules.AbstractRule {
issueType: 'Warning',
severity: 'Important',
level: 'Opportunity for Excellence',
group: 'Clarity',
commonWeaknessEnumeration: '398, 710'
group: 'Accessibility'
};

public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
Expand Down
3 changes: 1 addition & 2 deletions src/reactA11yRoleHasRequiredAriaPropsRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ export class Rule extends Lint.Rules.AbstractRule {
issueType: 'Warning',
severity: 'Important',
level: 'Opportunity for Excellence',
group: 'Clarity',
commonWeaknessEnumeration: '398, 710'
group: 'Accessibility'
};

public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
Expand Down
3 changes: 1 addition & 2 deletions src/reactA11yRoleRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ export class Rule extends Lint.Rules.AbstractRule {
issueType: 'Warning',
severity: 'Important',
level: 'Opportunity for Excellence',
group: 'Clarity',
commonWeaknessEnumeration: '398, 710'
group: 'Accessibility'
};

public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
Expand Down
3 changes: 1 addition & 2 deletions src/reactA11yRoleSupportsAriaPropsRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ export class Rule extends Lint.Rules.AbstractRule {
issueType: 'Warning',
severity: 'Important',
level: 'Opportunity for Excellence',
group: 'Clarity',
commonWeaknessEnumeration: '398, 710'
group: 'Accessibility'
};

public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
Expand Down
3 changes: 1 addition & 2 deletions src/reactA11yTabindexNoPositiveRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export class Rule extends Lint.Rules.AbstractRule {
issueType: 'Warning',
severity: 'Important',
level: 'Opportunity for Excellence',
group: 'Clarity',
commonWeaknessEnumeration: '398, 710'
group: 'Accessibility'
};

public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
Expand Down
18 changes: 6 additions & 12 deletions tslint-warnings.csv
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,13 @@ promise-must-complete,"When a Promise instance is created, then either the rejec
quotemark,Requires single or double quotes for string literals.,TSLINTU8MMGA,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality
CWE 710 - Coding Standards Violation"
radix,Requires the radix parameter to be specified when calling `parseInt`.,TSLINTTLKJQ5,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,710,"CWE 710 - Coding Standards Violation"
react-a11y-img-has-alt,Enforce that an `img` element contains the `alt` attribute or `role='presentation'` for decorative image.,TSLINT1OM69KS,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality
CWE 710 - Coding Standards Violation"
react-a11y-img-has-alt,Enforce that an `img` element contains the `alt` attribute or `role='presentation'` for decorative image.,TSLINT1OM69KS,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,,
react-a11y-lang,"For accessibility of your website, html elements must have a valid lang attribute.",TSLINTQ046RM,tslint,Non-SDL,Warning,Low,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,,
react-a11y-props,Enforce all `aria-*` attributes are valid. Elements cannot use an invalid `aria-*` attribute.,TSLINT1682S78,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality
CWE 710 - Coding Standards Violation"
react-a11y-role,"Elements with aria roles must use a **valid**, **non-abstract** aria role.",TSLINTQ0A2FU,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality
CWE 710 - Coding Standards Violation"
react-a11y-role-has-required-aria-props,Elements with aria roles must have all required attributes according to the role.,TSLINT1R1B60O,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality
CWE 710 - Coding Standards Violation"
react-a11y-role-supports-aria-props,Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.,TSLINT1IFADTQ,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality
CWE 710 - Coding Standards Violation"
react-a11y-tabindex-no-positive,Enforce tabindex value is **not greater than zero**.,TSLINTEO7FKT,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"398, 710","CWE 398 - Indicator of Poor Code Quality
CWE 710 - Coding Standards Violation"
react-a11y-props,Enforce all `aria-*` attributes are valid. Elements cannot use an invalid `aria-*` attribute.,TSLINT1682S78,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,,
react-a11y-role,"Elements with aria roles must use a **valid**, **non-abstract** aria role.",TSLINTQ0A2FU,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,,
react-a11y-role-has-required-aria-props,Elements with aria roles must have all required attributes according to the role.,TSLINT1R1B60O,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,,
react-a11y-role-supports-aria-props,Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.,TSLINT1IFADTQ,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,,
react-a11y-tabindex-no-positive,Enforce tabindex value is **not greater than zero**.,TSLINTEO7FKT,tslint,Non-SDL,Warning,Important,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,,
react-a11y-titles,"For accessibility of your website, HTML title elements must be concise and non-empty.",TSLINT1506S53,tslint,Non-SDL,Warning,Moderate,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,,
react-iframe-missing-sandbox,React iframes must specify a sandbox attribute,TSLINTU1H6V4,tslint,Non-SDL,Error,Critical,Opportunity for Excellence,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,915,"CWE 915 - Improperly Controlled Modification of Dynamically-Determined Object Attributes"
react-no-dangerous-html,Do not use React's dangerouslySetInnerHTML API.,TSLINTPH7BOD,tslint,SDL,Error,Critical,Mandatory,See description on the tslint or tslint-microsoft-contrib website,TSLint Procedure,"79, 85, 710","CWE 79 - Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Expand Down

0 comments on commit 5ba18c4

Please sign in to comment.