Skip to content

Commit

Permalink
fixed - strict comarison preventing misssing form label form returnin…
Browse files Browse the repository at this point in the history
…g issues #543
  • Loading branch information
SteveJonesDev committed Mar 26, 2024
1 parent 8e16089 commit f8927e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/rules/missing_form_label.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ function ac_input_has_label( $field, $dom ) {
if ( $field->getAttribute( 'aria-label' ) ) {
return true;
}
if ( $dom->find( 'label[for="' . $field->getAttribute( 'id' ) . '"]', -1 ) !== '' ) {
if ( $dom->find( 'label[for="' . $field->getAttribute( 'id' ) . '"]', -1 ) !== null ) {

return true;
}
return edac_field_has_label_parent( $field );
Expand Down

0 comments on commit f8927e4

Please sign in to comment.