dsathyakumar/a11y-auditor

View on GitHub

Showing 50 of 129 total issues

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module.exports = {
    name: 'hasLinkToSkipToMainContent',
    description: 'Check if there is a link that helps skip irrelevant information and land the user at the main content',
    ruleID: 'AX_27',
    tagName: [],
Severity: Major
Found in lib/rulesImpl/AX_27.js and 7 other locations - About 40 mins to fix
lib/rulesImpl/AX_07.js on lines 41..49
lib/rulesImpl/AX_12.js on lines 34..42
lib/rulesImpl/AX_13.js on lines 32..40
lib/rulesImpl/AX_16.js on lines 44..52
lib/rulesImpl/AX_22.js on lines 32..40
lib/rulesImpl/AX_24.js on lines 56..64
lib/rulesImpl/AX_26.js on lines 44..52

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module.exports = {
    name: 'hasMoreThanOneRoleMain',
    description: 'There should be only one main element for a web page document',
    ruleID: 'AX_13',
    tagName: [],
Severity: Major
Found in lib/rulesImpl/AX_13.js and 7 other locations - About 40 mins to fix
lib/rulesImpl/AX_07.js on lines 41..49
lib/rulesImpl/AX_12.js on lines 34..42
lib/rulesImpl/AX_16.js on lines 44..52
lib/rulesImpl/AX_22.js on lines 32..40
lib/rulesImpl/AX_24.js on lines 56..64
lib/rulesImpl/AX_26.js on lines 44..52
lib/rulesImpl/AX_27.js on lines 44..52

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module.exports = {
    name: 'hasTitle',
    description: 'The webpage should have a title that describes topic or purpose',
    ruleID: 'AX_07',
    tagName: [],
Severity: Major
Found in lib/rulesImpl/AX_07.js and 7 other locations - About 40 mins to fix
lib/rulesImpl/AX_12.js on lines 34..42
lib/rulesImpl/AX_13.js on lines 32..40
lib/rulesImpl/AX_16.js on lines 44..52
lib/rulesImpl/AX_22.js on lines 32..40
lib/rulesImpl/AX_24.js on lines 56..64
lib/rulesImpl/AX_26.js on lines 44..52
lib/rulesImpl/AX_27.js on lines 44..52

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module.exports = {
    name: 'isDeprecatedElement',
    description: 'Avoid Deprecated features of W3C technologies',
    ruleID: 'AX_16',
    tagName: [],
Severity: Major
Found in lib/rulesImpl/AX_16.js and 7 other locations - About 40 mins to fix
lib/rulesImpl/AX_07.js on lines 41..49
lib/rulesImpl/AX_12.js on lines 34..42
lib/rulesImpl/AX_13.js on lines 32..40
lib/rulesImpl/AX_22.js on lines 32..40
lib/rulesImpl/AX_24.js on lines 56..64
lib/rulesImpl/AX_26.js on lines 44..52
lib/rulesImpl/AX_27.js on lines 44..52

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module.exports = {
    name: 'hasNoScriptTag',
    description: 'Ensure that pages are usable when scripts, applets, or other programmatic objects are turned off or not supported. If this is not possible, provide equivalent information on an alternative accessible page',
    ruleID: 'AX_22',
    tagName: [],
Severity: Major
Found in lib/rulesImpl/AX_22.js and 7 other locations - About 40 mins to fix
lib/rulesImpl/AX_07.js on lines 41..49
lib/rulesImpl/AX_12.js on lines 34..42
lib/rulesImpl/AX_13.js on lines 32..40
lib/rulesImpl/AX_16.js on lines 44..52
lib/rulesImpl/AX_24.js on lines 56..64
lib/rulesImpl/AX_26.js on lines 44..52
lib/rulesImpl/AX_27.js on lines 44..52

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

module.exports = {
    name: 'hasRequiredMetaAttributes',
    description: 'Check if there is a meta tag with charset, keywords, description, author, copyright attributes defined',
    ruleID: 'AX_26',
    tagName: [],
Severity: Major
Found in lib/rulesImpl/AX_26.js and 7 other locations - About 40 mins to fix
lib/rulesImpl/AX_07.js on lines 41..49
lib/rulesImpl/AX_12.js on lines 34..42
lib/rulesImpl/AX_13.js on lines 32..40
lib/rulesImpl/AX_16.js on lines 44..52
lib/rulesImpl/AX_22.js on lines 32..40
lib/rulesImpl/AX_24.js on lines 56..64
lib/rulesImpl/AX_27.js on lines 44..52

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 48.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            b.controlValue && (f = b.controlValue, a ? f.unused = !0 : a = f.text);
Severity: Minor
Found in lib/axs/axsUtils.js and 1 other location - About 35 mins to fix
lib/axs/axsUtils.js on lines 313..313

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            b.controlValue && (f = b.controlValue, a ? f.unused = !0 : a = f.text);
Severity: Minor
Found in lib/axs/axsUtils.js and 1 other location - About 35 mins to fix
lib/axs/axsUtils.js on lines 278..278

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 46.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        return a instanceof b.HTMLButtonElement || a instanceof b.HTMLInputElement ||
        a instanceof b.HTMLSelectElement || a instanceof b.HTMLTextAreaElement ? !0 : !1;
Severity: Minor
Found in lib/axs/axsUtils.js and 1 other location - About 30 mins to fix
lib/utils/accessibilityUtils.js on lines 176..179

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

          elem instanceof doc.HTMLInputElement ||
          elem instanceof doc.HTMLSelectElement ||
          elem instanceof doc.HTMLTextAreaElement ||
          elem instanceof doc.HTMLButtonElement ||
Severity: Minor
Found in lib/utils/accessibilityUtils.js and 1 other location - About 30 mins to fix
lib/axs/axsUtils.js on lines 205..206

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 45.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language