esc_html__( 'Empty Button', 'accessibility-checker' ),
'info_url' => 'https://a11ychecker.com/help1960',
'slug' => 'empty_button',
'rule_type' => 'error',
'summary' => sprintf(
// translators: %1$s is <button>, %2$s is <input>.
esc_html__( 'This element is a %1$s or %2$s with no accessible label or text.', 'accessibility-checker' ),
'<button>',
'<input>'
),
'summary_plural' => sprintf(
// translators: %1$s is <button>, %2$s is <input>.
esc_html__( 'These elements are %1$s or %2$s with no accessible label or text.', 'accessibility-checker' ),
'<button>',
'<input>'
),
'why_it_matters' => esc_html__( 'Buttons must clearly describe the action they perform. An empty button provides no information to screen readers or keyboard users, making it impossible to understand what clicking the button will do. This creates a barrier for people relying on assistive technologies.', 'accessibility-checker' ),
'how_to_fix' => sprintf(
// translators: %1$s is <button>, %2$s is value, %3$s is alt, %4$s is aria-hidden="true", %5$s is aria-label.
esc_html__( 'Add visible text inside the %1$s element, set a %2$s attribute on an input button, or include an %3$s attribute on a button image. If the button uses only an icon (e.g., SVG or webfont), hide the icon with %4$s and add a descriptive %5$s to the button or include screen reader-only text. Each button must have a label that clearly describes its purpose or action.', 'accessibility-checker' ),
'<button>',
'value',
'alt',
'aria-hidden="true"',
'aria-label'
),
'references' => [
[
'text' => __( 'MDN Web Docs: