Project

hatemile

0.0
No commit activity in last 3 years
No release in over 3 years
HaTeMiLe (HTML Accessible) is a open source library developed to improve accessibility converting a HTML code in a new HTML code more accessible, its features is based in WCAG 2.0 document, eMAG 3.1 document and some features of Job Access With Speech (JAWS), Opera before version 15 and Mozilla Firefox.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0.58.1, ~> 0.58
>= 0.9.14, ~> 0.9

Runtime

>= 1.6.0, ~> 1.6
>= 1.8.0, ~> 1.8
 Project Readme

HaTeMiLe for Ruby

HaTeMiLe (HTML Accessible) is a library that can convert a HTML code in a HTML code more accessible.

Accessibility solutions

Documentation

To generate the full API documentation of HaTeMiLe of Ruby:

  1. Install dependencies;
  2. Execute the Rake task doc in directory;
    rake doc
  3. Open the doc/index.html with an internet browser.

Import the library to your project

To install the HaTeMiLe for Ruby library, execute these command in terminal:

gem install hatemile

Usage

Import all needed classes:

require 'rubygems'
require 'bundler/setup'

require 'hatemile/util/configure'
require 'hatemile/util/html/nokogiri/nokogiri_html_dom_parser'
require 'hatemile/util/css/rcp/rcp_parser'
require 'hatemile/implementation/accessible_css_implementation'
require 'hatemile/implementation/accessible_display_implementation'
require 'hatemile/implementation/accessible_event_implementation'
require 'hatemile/implementation/accessible_form_implementation'
require 'hatemile/implementation/accessible_navigation_implementation'
require 'hatemile/implementation/accessible_association_implementation'

Instanciate the configuration, the parsers and solution classes and execute them:

configure = Hatemile::Util::Configure.new

html_parser = Hatemile::Util::Html::NokogiriLib::NokogiriHTMLDOMParser.new(html_code)
css_parser = Hatemile::Util::Css::Rcp::RCPParser.new(html_parser, current_url)

events = Hatemile::Implementation::AccessibleEventImplementation.new(html_parser)
css = Hatemile::Implementation::AccessibleCSSImplementation.new(html_parser, css_parser, configure)
forms = Hatemile::Implementation::AccessibleFormImplementation.new(html_parser)
navigation = Hatemile::Implementation::AccessibleNavigationImplementation.new(html_parser, configure)
association = Hatemile::Implementation::AccessibleAssociationImplementation.new(html_parser)
display = Hatemile::Implementation::AccessibleDisplayImplementation.new(html_parser, configure)

events.make_accessible_all_drag_and_drop_events
events.make_accessible_all_click_events
events.make_accessible_all_hover_events

forms.mark_all_autocomplete_fields
forms.mark_all_range_fields
forms.mark_all_required_fields
forms.mark_all_invalid_fields

association.associate_all_data_cells_with_header_cells
association.associate_all_labels_with_fields

css.provide_all_speak_properties

display.display_all_shortcuts
display.display_all_roles
display.display_all_cell_headers
display.display_all_waiaria_states
display.display_all_links_attributes
display.display_all_titles
display.display_all_languages
display.display_all_alternative_text_images

navigation.provide_navigation_by_all_headings
navigation.provide_navigation_by_all_skippers
navigation.provide_navigation_to_all_long_descriptions

display.display_all_shortcuts

puts(html_parser.get_html)

Contributing

If you want contribute with HaTeMiLe for Ruby, read contributing guidelines.

See also