HaTeMiLe for Python
HaTeMiLe (HTML Accessible) is a library that can convert a HTML code in a HTML code more accessible.
Accessibility solutions
- Associate HTML elements;
- Provide a polyfill to CSS Speech and CSS Aural properties;
- Display inacessible informations of page;
- Enable all functionality of page available from a keyboard;
- Improve the acessibility of forms;
- Provide accessibility resources to navigate.
Documentation
To generate the full API documentation of HaTeMiLe of Python:
- Install, create and activate a virtualenv;
- Install dependencies;
- Execute the API docs of sphinx in
docsdirectory;sphinx-apidoc -e -f -o _modules/ ../hatemile make html
- Open the
docs/_build/html/index.htmlwith an internet browser.
Import the library to your project
To install the HaTeMiLe for Python library, execute these command in terminal:
pip install hatemile
Usage
Import all needed classes:
from hatemile.implementation.assoc import AccessibleAssociationImplementation
from hatemile.implementation.css import AccessibleCSSImplementation
from hatemile.implementation.display import AccessibleDisplayImplementation
from hatemile.implementation.event import AccessibleEventImplementation
from hatemile.implementation.form import AccessibleFormImplementation
from hatemile.implementation.navig import AccessibleNavigationImplementation
from hatemile.util.configure import Configure
from hatemile.util.css.tinycss.tinycssparser import TinyCSSParser
from hatemile.util.html.bs.bshtmldomparser import BeautifulSoupHTMLDOMParser
Instanciate the configuration, the parsers and solution classes and execute them:
configure = Configure()
parser = BeautifulSoupHTMLDOMParser(html_code)
css_parser = TinyCSSParser(parser, current_url)
event = AccessibleEventImplementation(parser)
css = AccessibleCSSImplementation(parser, css_parser, configure)
form = AccessibleFormImplementation(parser)
navigation = AccessibleNavigationImplementation(parser, configure)
association = AccessibleAssociationImplementation(parser)
display = AccessibleDisplayImplementation(parser, configure)
event.make_accessible_all_drag_and_drop_events()
event.make_accessible_all_click_events()
event.make_accessible_all_hover_events()
form.mark_all_required_fields()
form.mark_all_range_fields()
form.mark_all_autocomplete_fields()
form.mark_all_invalid_fields()
navigation.provide_navigation_by_all_headings()
navigation.provide_navigation_by_all_skippers()
navigation.provide_navigation_to_all_long_descriptions()
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_skippers()
display.display_all_shortcuts()
print(parser.get_html())
Contributing
If you want contribute with HaTeMiLe for Python, read contributing guidelines.
See also
Metadata
Release files for hatemile 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hatemile-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for hatemile-2.0.1-py3-none-any.whl |
Release files / hatemile-2.0.1-py3-none-any.whl
| Download URL | hatemile-2.0.1-py3-none-any.whl |
|---|---|
| Size | 68.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f69040882ff9cb766a1984280b983f3e9026465cdb8da678b88dff04129b66c3
|
|
BLAKE2b-256 checksum How to use checksums |
1b8dd5fc1a2ff1c13cf3e430b7fc240f863f7ea4175b5b2ac556d565243425e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for hatemile 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.