From f8927e4be62c600ccab3a3e0c240c6a33ce185c1 Mon Sep 17 00:00:00 2001 From: Steve Jones Date: Tue, 26 Mar 2024 17:18:05 -0400 Subject: [PATCH] fixed - strict comarison preventing misssing form label form returning issues #543 --- includes/rules/missing_form_label.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/rules/missing_form_label.php b/includes/rules/missing_form_label.php index 2f352eeb..40fea13c 100644 --- a/includes/rules/missing_form_label.php +++ b/includes/rules/missing_form_label.php @@ -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 );