dsathyakumar/a11y-auditor

View on GitHub

Showing 79 of 129 total issues

Avoid too many return statements within this function.
Open

            return d;
Severity: Major
Found in lib/axs/axsUtils.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return d;
    Severity: Major
    Found in lib/axs/axsUtils.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                          return false;
      Severity: Major
      Found in lib/utils/elemVisibilityChecker.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return true; //> element is visible and so return TRUE
        Severity: Major
        Found in lib/utils/elemVisibilityChecker.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return b;
          Severity: Major
          Found in lib/axs/axsUtils.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                      return _par; //> return the parent
            Severity: Major
            Found in lib/utils/accessibilityUtils.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return (elem.length > 0) ? this.getParentNodeType(elem[elem.length - 1]) : null;
              Severity: Major
              Found in lib/utils/accessibilityUtils.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return d;
                Severity: Major
                Found in lib/axs/axsUtils.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return _res;
                  Severity: Major
                  Found in lib/axs/axsUtils.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return 0 < a.length ? this.composedParentNode(a[a.length - 1]) : null;
                    Severity: Major
                    Found in lib/axs/axsUtils.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return {
                                      TYPE: _severityEnum.INFO,
                                      RESULT: true,
                                      MSG: 'Passed! element is visible and focusable'
                                  };
                      Severity: Major
                      Found in lib/rulesImpl/AX_36.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return d.reason = c.reason, d;
                        Severity: Major
                        Found in lib/axs/axsUtils.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return {
                                      TYPE: _severityEnum.INFO,
                                      RESULT: true,
                                      MSG: 'Passed!'
                                  };
                          Severity: Major
                          Found in lib/rulesImpl/AX_01.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return d;
                            Severity: Major
                            Found in lib/axs/axsUtils.js - About 30 mins to fix

                              Function hasClickEvents has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  hasClickEvents: function(elem) {
                                      var _hasClicks = false; //> boolean to hold if any event of type click or double click exists
                                      /*jshint -W030 */
                                      if (window.getEventListeners) {
                                          //> if window.getEventListeners exists. In most browsers it wont
                              Severity: Minor
                              Found in lib/utils/accessibilityUtils.js - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function isElementHidden has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  isElementHidden: function(a) {
                                      if (!(a instanceof a.ownerDocument.defaultView.HTMLElement)) {
                                          return !1;
                                      }
                                      if (a.hasAttribute('chromevoxignoreariahidden')) {
                              Severity: Minor
                              Found in lib/axs/axsUtils.js - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function complianceChecker has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  complianceChecker: function(ruleComplianceValue, auditConfigCompliance) {
                                      var _result = false;
                                      /*jshint -W030 */
                                      (typeof auditConfigCompliance === 'string') ? (_result = (ruleComplianceValue === auditConfigCompliance)) : ((auditConfigCompliance instanceof Array) ? ((auditConfigCompliance.length > 0) ? _result = this.complianceLooper(ruleComplianceValue, auditConfigCompliance) : _result = true) : _result = true);
                                      return _result;
                              Severity: Minor
                              Found in lib/audit/auditRunnerHelper.js - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function isAHiddenElem has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  isAHiddenElem: function(elem) {
                              
                                      //> check if the element is part of the current document and not in some iframe etc.,
                                      if (!(elem instanceof elem.ownerDocument.defaultView.HTMLElement)) {
                                          return true; //> No! it is not part of the current document and is hidden.
                              Severity: Minor
                              Found in lib/utils/accessibilityUtils.js - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function _ruleExector has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function _ruleExector(elem) {
                              
                                  var _severityEnum = enums.severityEnum,
                                      _id;
                              
                              
                              Severity: Minor
                              Found in lib/rulesImpl/AX_04.js - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Severity
                              Category
                              Status
                              Source
                              Language