lib/hatemile/implementation/accessible_event_implementation.rb
##
# Provide keyboard access for element, if it not has.
#
# @param element [Hatemile::Util::Html::HTMLDOMElement] The element.
# @return [void]
Provide keyboard access for element, if it not has.
Provide keyboard access for element if it not has .
def keyboard_access(element)
        return if element.has_attribute?('tabindex')
        tag = element.get_tag_name
        if (tag == 'A') && !element.has_attribute?('href')
          element.set_attribute('tabindex', '0')
        elsif (tag != 'A') &&
              (tag != 'INPUT') &&
              (tag != 'BUTTON') &&
              (tag != 'SELECT') &&
              (tag != 'TEXTAREA')
          element.set_attribute('tabindex', '0')
        end
      end
def keyboard_access ( element ) return if element . has_attribute? ( 'tabindex' ) tag = element . get_tag_name if ( tag == 'A' ) && ! element . has_attribute? ( 'href' ) element . set_attribute ( 'tabindex' , '0' ) elsif ( tag != 'A' ) && ( tag != 'INPUT' ) && ( tag != 'BUTTON' ) && ( tag != 'SELECT' ) && ( tag != 'TEXTAREA' ) element . set_attribute ( 'tabindex' , '0' ) end end
Provide keyboard access for element, if it not has.
Provide keyboard access for element if it not has .
None
void
element
None