Skip to content

Commit

Permalink
Fix label check when label does not exist
Browse files Browse the repository at this point in the history
Ref: #279
  • Loading branch information
ironikart committed Apr 13, 2020
1 parent a30f085 commit c064710
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Standards/WCAG2AAA/Sniffs/Principle2/Guideline2_5/2_5_3.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ _global.HTMLCS_WCAG2AAA_Sniffs_Principle2_Guideline2_5_2_5_3 = {
} else {
var refNode = top.getElementById(labelFor);
}
accessibleName = HTMLCS.util.getAccessibleName(refNode, top);
if (refNode) {
accessibleName = HTMLCS.util.getAccessibleName(refNode, top);
}
}
break;
case "input":
Expand Down

0 comments on commit c064710

Please sign in to comment.