nothrem/jquery-aria

View on GitHub

Showing 3 of 7 total issues

Function removeRole has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        removeRole: function(value) {
            var i, elem, current_roles, roles, j;

            if (arguments.length === 0) {
                for (i = this.length - 1; i >= 0; --i) {
Severity: Minor
Found in src/jquery.aria.js - About 1 hr to fix

    Function addRole has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            addRole: function(value) {
                var roles, i, elem, current_roles, j, roles_length;
    
                if ($.isFunction(value)) {
                    return this.each(function(i) {
    Severity: Minor
    Found in src/jquery.aria.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                                  if (current_roles.indexOf(' ' + roles[j] + ' ') < 0) {
                                      current_roles += roles[j] + ' ';
                                  }
      Severity: Major
      Found in src/jquery.aria.js - About 45 mins to fix
        Severity
        Category
        Status
        Source
        Language