Create an accessible tree with a Python object.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

662 B

Accessible Trees

This tool creates accessible trees in HTML. It automatically adds aria-role="tree" and aria-role="treeitem" to the relevant items.


To change the output of the tree, read the file. Many, many examples are laid out in there. You do not need to create a tuple if there are no children.

Install one (optional) package: bs4 (Beautiful Soup 4), with pip install -r requirements.txt. This will make the output "pretty" (i.e. indented).

To print the output to terminal, run python

To save to a file, run python file.html.

To append to an already existing file, run python >> file.html