lib/hatemile/implementation/accessible_css_implementation.rb
##
# Revert changes of a speak_as method for element and descendants.
#
# @param element [Hatemile::Util::Html::HTMLDOMElement] The element.
# @param data_property_value [String] The value of custom attribute used
#   to identify the fix.
Revert changes of a speak_as method for element and descendants.
Revert changes of a speak_as method for element and descendants .
def reverse_speak_as(element, data_property_value)
        data_property = "[#{DATA_SPEAK_AS}=\"#{data_property_value}\"]"
        auxiliar_elements = @html_parser.find(element).find_descendants(
          "#{data_property}[unselectable=\"on\"]"
        ).list_results
        auxiliar_elements.each(&:remove_node)
        content_elements = @html_parser.find(element).find_descendants(
          "#{data_property}[#{DATA_ISOLATOR_ELEMENT}=\"true\"],
          #{data_property}[aria-hidden]"
        ).list_results
        content_elements.each do |content_element|
          replace_element_by_own_content(content_element)
        end
        element.normalize
      end
def reverse_speak_as ( element , data_property_value ) data_property = "[#{DATA_SPEAK_AS}=\"#{data_property_value}\"]" auxiliar_elements = @html_parser . find ( element ) . find_descendants ( "#{data_property}[unselectable=\"on\"]" ) . list_results auxiliar_elements . each ( & :remove_node ) content_elements = @html_parser . find ( element ) . find_descendants ( "#{data_property}[#{DATA_ISOLATOR_ELEMENT}=\"true\"],
          #{data_property}[aria-hidden]" ) . list_results content_elements . each do | content_element | replace_element_by_own_content ( content_element ) end element . normalize end
Revert changes of a speak_as method for element and descendants.
Revert changes of a speak_as method for element and descendants .
element
None
data_property_value
The value of custom attribute used to identify the fix.
The value of custom attribute used to identify the fix .