lib/hatemile/implementation/accessible_navigation_implementation.rb
##
# Check that the headings of page are sintatic correct.
#
# @return [Boolean] True if the headings of page are sintatic correct or
#   false if not.
Check that the headings of page are sintatic correct.
Check that the headings of page are sintatic correct .
def valid_heading?
        elements = @parser.find('h1,h2,h3,h4,h5,h6').list_results
        last_level = 0
        count_main_heading = 0
        @validate_heading = true
        elements.each do |element|
          level = get_heading_level(element)
          if level == 1
            return false if count_main_heading == 1
            count_main_heading = 1
          end
          return false if (level - last_level) > 1
          last_level = level
        end
        true
      end
def valid_heading? elements = @parser . find ( 'h1,h2,h3,h4,h5,h6' ) . list_results last_level = 0 count_main_heading = 0 @validate_heading = true elements . each do | element | level = get_heading_level ( element ) if level == 1 return false if count_main_heading == 1 count_main_heading = 1 end return false if ( level - last_level ) > 1 last_level = level end true end
Check that the headings of page are sintatic correct.
Check that the headings of page are sintatic correct .
True if the headings of page are sintatic correct or false if not.
True if the headings of page are sintatic correct or false if not .
Boolean