Class: A11y::Lint::Rules::ButtonTagMissingAccessibleName

Inherits:
NodeRule
  • Object
show all
Defined in:
lib/a11y/lint/rules/robust/button_tag_missing_accessible_name.rb

Overview

Checks that button_tag calls with empty text or block content include an aria-label (WCAG 4.1.2).

Instance Method Summary collapse

Methods inherited from NodeRule

check, #initialize, rule_name

Constructor Details

This class inherits a constructor from A11y::Lint::NodeRule

Instance Method Details

#checkObject



9
10
11
12
13
# File 'lib/a11y/lint/rules/robust/button_tag_missing_accessible_name.rb', line 9

def check
  return if no_offense?

  offense_message
end