class ERBLint::Linters::GitHub::Accessibility::AvoidBothDisabledAndAriaDisabled
Constants
- ELEMENTS_WITH_NATIVE_DISABLED_ATTRIBUTE_SUPPORT
- MESSAGE
Public Instance Methods
run(processed_source)
click to toggle source
# File lib/erblint-github/linters/github/accessibility/avoid_both_disabled_and_aria_disabled.rb, line 16 def run(processed_source) tags(processed_source).each do |tag| next if tag.closing? next unless ELEMENTS_WITH_NATIVE_DISABLED_ATTRIBUTE_SUPPORT.include?(tag.name) next unless tag.attributes["disabled"] && tag.attributes["aria-disabled"] generate_offense(self.class, processed_source, tag) end rule_disabled?(processed_source) end