Some HTML validating hooks using lxml for pre-commit
Python
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pre_commit_hooks
tests
.gitignore
.pre-commit-config.yaml
.pre-commit-hooks.yaml
.pylintrc
.travis.yml
README.md
dev-requirements.txt
pytest.ini
requirements.txt
setup.py

README.md

Known Vulnerabilities

Useful pre-commit hooks to check your CSS / HTML pages / templates.

Usage

-   repo: https://github.com/Lucas-C/pre-commit-hooks-lxml
    sha: v1.1.0
    hooks:
    -   id: forbid-html-img-without-alt-text
    -   id: forbid-non-std-html-attributes
    -   id: detect-missing-css-classes
        args:
        - --css-files-dir
        - .
        - --html-files-dir
        - .
    -   id: html-tags-blacklist
    -   id: html-attributes-blacklist

[FR] Accessibilité RGAA

Les hooks html-tags-blacklist & html-attributes-blacklist sont configurés par défaut pour interdire les élements et attributs nuisant à l'accessibilité, selon les recommendations d'Access42.

cf. issue #2

Dependencies needed to use lxml

Under Cygwin, with apt-cyg:

apt-cyg install git python3 gcc-g++ python3-devel libxml2-devel libxslt-devel

With MSYS2 :

pacman -S git python3 gcc python3-devel libxml2-devel libxslt-devel tar

The package names must be very similar under Linux.