Skip to main content

HaTeMiLe for Django improve accessibility of web pages that uses the Django framework, converting pages with HTML code into pages with a more accessible code.

Project description

HaTeMiLe for Django

HaTeMiLe for Django improve accessibility of web pages that uses the Django framework, converting pages with HTML code into pages with a more accessible code.

Accessibility solutions

Documentation

To generate the full API documentation of HaTeMiLe of Django:

  1. Install, create and activate a virtualenv;
  2. Install dependencies;
  3. Execute the API docs of sphinx in docs directory;
    sphinx-apidoc -e -f -o _modules/ ../hatemile
    make html
    
  4. Open the docs/_build/html/index.html with an internet browser.

Usage

Add HaTeMiLe for Django in INSTALLED_APPS of settings.py, to load the stylesheet that hide visual changes of library and the scripts used in events.

INSTALLED_APPS = [
    # ...
    'hatemile_for_django',
]

Add the middleware of HaTeMiLe for Django in MIDDLEWARE_CLASSES of settings.py.

MIDDLEWARE_CLASSES = (
    # ...
    'hatemile_for_django.middleware.AccessibleDjangoMiddleware',
)

You can control which are solutions will be executed, add the dict HATEMILE_PARAMETERS in settings.py.

HATEMILE_PARAMETERS = {
    # Associate all data cells with header cells of all tables.
    'associate-all-data-cells-with-header-cells': True,
    # Associate all labels with fields.
    'associate-all-labels-with-fields': True,
    # Provide the CSS features of speaking and speech properties in all
    # elements.
    'provide-all-speak-properties': False,
    # Display the alternative text of all images.
    'display-all-alternative-text-images': True,
    # Display the headers of each data cell of all tables.
    'display-all-cell-headers': True,
    # Display the language of all elements.
    'display-all-languages': True,
    # Display the attributes of all links.
    'display-all-links-attributes': True,
    # Display the WAI-ARIA roles of all elements.
    'display-all-roles': True,
    # Display the titles of all elements.
    'display-all-titles': True,
    # Display all shortcuts.
    'display-all-shortcuts': True,
    # Display the WAI-ARIA attributes of all elements.
    'display-all-wai-aria-states': True,
    # Make all click events available from a keyboard.
    'make-accessible-all-click-events': True,
    # Make all Drag-and-Drop events available from a keyboard.
    'make-accessible-all-drag-and-drop-events': True,
    # Make all hover events available from a keyboard.
    'make-accessible-all-hover-events': True,
    # Mark that the fields have autocomplete.
    'mark-all-autocomplete-fields': True,
    # Mark that the fields have range.
    'mark-all-range-fields': True,
    # Mark that the fields is required.
    'mark-all-required-fields': True,
    # Mark a solution to display that a fields are invalid.
    'mark-all-invalid-fields': True,
    # Provide an alternative way to access the longs descriptions of all
    # elements.
    'provide-navigation-to-all-long-descriptions': True,
    # Provide navigation by headings.
    'provide-navigation-by-all-headings': True,
    # Provide navigation by content skippers.
    'provide-navigation-by-all-skippers': True,
    # Hide visual changes of HaTeMiLe.
    'hide-hatemile-changes': True,
}

Contributing

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

See also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

hatemile_for_django-1.0.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file hatemile_for_django-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hatemile_for_django-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d71396cdc5f2f28030b2ed87ac031523baf4a75a04a8a6f38f06067eb02e1fe
MD5 c2e1e818b8a2e955cef6257cb692b626
BLAKE2b-256 864cdcdf67054546684819e507a6c3e757aa732ab758909e788ee30bfc0a6792

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page