esc_html__( 'Missing Form Label', 'accessibility-checker' ), 'info_url' => 'https://a11ychecker.com/help1949', 'slug' => 'missing_form_label', 'rule_type' => 'error', 'summary' => sprintf( // translators: %1$s is <input>, %2$s is <textarea>, %3$s is <select><input>', '<textarea>', '<select>' ), 'summary_plural' => sprintf( // translators: %1$s is <input>, %2$s is <textarea>, %3$s is <select><input>', '<textarea>', '<select>' ), 'why_it_matters' => esc_html__( 'Form fields must be clearly labeled so that users of screen readers and voice input technologies can understand their purpose. Without labels, users may not know what information to enter or how the form will behave.', 'accessibility-checker' ), 'how_to_fix' => sprintf( // translators: %1$s is <label>, %2$s is for=""<label>', 'for=""' ), 'references' => [ [ 'text' => __( 'W3C: Labeling Controls', 'accessibility-checker' ), 'url' => 'https://www.w3.org/WAI/tutorials/forms/labels/', ], [ 'text' => __( 'MDN: label element', 'accessibility-checker' ), 'url' => 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label', ], ], 'ruleset' => 'js', 'wcag' => '1.3.1', 'severity' => 1, // Critical. 'affected_disabilities' => [ AffectedDisabilities::BLIND, AffectedDisabilities::LOW_VISION, AffectedDisabilities::DEAFBLIND, AffectedDisabilities::COGNITIVE, AffectedDisabilities::MOBILITY, ], 'combines' => [ 'label' ], 'fixes' => [ AddLabelToUnlabelledFormFieldsFix::get_slug(), CommentSearchLabelFix::get_slug(), ], ]; } }