Skip to content

interactive w3c validation¤

    (get_ipython()).reset(True, True)
    shell = get_ipython()
    from nbconvert_a11y import pytest_w3c
    assert pytest_w3c.get_vnu_path(), "vnu validator isn't installed"
    from pathlib import Path
    from IPython.display import *
    import pytest, traceback
culling sys module...
    exception = pytest_w3c.Validator(
        url=Path("../../../nbconvert-a11y/tests/exports/html/lorenz-executed-default.html")
    ).run()
... starting vnu server at http://127.0.0.1:48953
>>> /home/tbone/mambaforge/envs/test-nbconvert-a11y/bin/java   -cp /home/tbone/mambaforge/envs/test-nbconvert-a11y/lib/vnu.jar -Dnu.validator.servlet.bind-address=127.0.0.1   nu.validator.servlet.Main   48953
nu.validator.servlet.VerifierServletTransaction - Starting static initializer.
nu.validator.servlet.VerifierServletTransaction - Reading miscellaneous properties.
nu.validator.servlet.VerifierServletTransaction - Starting to loop over config file lines.
nu.validator.servlet.VerifierServletTransaction - Finished reading config.
nu.validator.servlet.VerifierServletTransaction - Converted config to arrays.
nu.validator.servlet.VerifierServletTransaction - Prepared namespace array.
nu.validator.servlet.VerifierServletTransaction - Parsed doctype numbers into ints.
nu.validator.servlet.VerifierServletTransaction - The cache path prefix is: null
nu.validator.servlet.VerifierServletTransaction - Parsing set up. Starting to read schemas.
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/html5.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/html5-all.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/xhtml5.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/xhtml5-all.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/svg-xhtml5-rdf-mathml.rnc
nu.validator.servlet.VerifierServletTransaction - Schemas read.
nu.validator.servlet.VerifierServletTransaction - Reading spec.
nu.validator.servlet.VerifierServletTransaction - Spec read.

WARNING: Future checker releases will bind by default to 127.0.0.1.
Your checker deployment might become unreachable unless you use the
nu.validator.servlet.bind-address system property or --bind-address
script option to bind the checker to a different address:

  python ./checker.py --bind-address 192.168.1.21 run
  java -Dnu.validator.servlet.bind-address=192.168.1.21 -cp vnu.jar nu.validator.servlet.Main 8888
  vnu-runtime-image/bin/java -Dnu.validator.servlet.bind-address=192.168.1.21 nu.validator.servlet.Main 8888
  vnu-runtime-image\bin\java.exe -Dnu.validator.servlet.bind-address=192.168.1.21 nu.validator.servlet.Main 8888

Checker service started at http://127.0.0.1:48953/
... vnu server started at http://127.0.0.1:48953
    exception.raises()
  + Exception Group Traceback (most recent call last):
  |   File "/home/tbone/mambaforge/envs/test-nbconvert-a11y/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3548, in run_code
  |     exec(code_obj, self.user_global_ns, self.user_ns)
  |   File "/tmp/ipykernel_151294/1259837071.py", line 1, in <module>
  |     exception.raises()
  |   File "/home/tbone/Documents/nbconvert-a11y/nbconvert_a11y/pytest_axe.py", line 130, in raises
  |     raise exception
  | nbconvert_a11y.pytest_axe.UnexpectedFail: html violations (14 sub-exceptions)
  +-+---------------- 1 ----------------
    | nbconvert_a11y.pytest_w3c.info-Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.
    +---------------- 2 ----------------
    | nbconvert_a11y.pytest_w3c.info-Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.
    +---------------- 3 ----------------
    | nbconvert_a11y.pytest_w3c.info-The “type” attribute for the “style” element is not needed and should be omitted.
    +---------------- 4 ----------------
    | nbconvert_a11y.pytest_w3c.info-The “type” attribute for the “style” element is not needed and should be omitted.
    +---------------- 5 ----------------
    | nbconvert_a11y.pytest_w3c.error-Unknown pseudo-element or pseudo-class “:horizontal”
    +---------------- 6 ----------------
    | nbconvert_a11y.pytest_w3c.error-Unknown pseudo-element or pseudo-class “:vertical”
    +---------------- 7 ----------------
    | nbconvert_a11y.pytest_w3c.error-box-shadow
    +---------------- 8 ----------------
    | nbconvert_a11y.pytest_w3c.error-overflow
    +---------------- 9 ----------------
    | nbconvert_a11y.pytest_w3c.info-The “type” attribute for the “style” element is not needed and should be omitted.
    +---------------- 10 ----------------
    | nbconvert_a11y.pytest_w3c.info-The “type” attribute for the “style” element is not needed and should be omitted.
    +---------------- 11 ----------------
    | nbconvert_a11y.pytest_w3c.info-The “type” attribute is unnecessary for JavaScript resources.
    +---------------- 12 ----------------
    | nbconvert_a11y.pytest_w3c.info-Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.
    +---------------- 13 ----------------
    | nbconvert_a11y.pytest_w3c.info-Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.
    +---------------- 14 ----------------
    | nbconvert_a11y.pytest_w3c.error-Stray start tag “script”.
    +------------------------------------