Skip to content

Commit

Permalink
rename to nbconvert-a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfast committed Nov 21, 2023
1 parent ed95afa commit dd5f0c2
Show file tree
Hide file tree
Showing 46 changed files with 216 additions and 117 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
docs
site
tests/exports
nbconvert_html5/templates/a11y/light-code.css
nbconvert_html5/templates/a11y/dark-code.css
nbconvert_a11y/templates/a11y/light-code.css
nbconvert_a11y/templates/a11y/dark-code.css

*~
*#
.#*
*.pyc
.python-version
nbconvert_html5.egg-info
nbconvert_a11y.egg-info
node_modules
__pycache__
.doit.db.*
nbconvert_html5/_version.py
nbconvert_a11y/_version.py
tests/outputs/*.html
build/*
tests/out.html
*-checkpoint*
docs/**/*.html
docs/**/*.json
settings.json
nbconvert_html5/templates/a11y/axe.js
nbconvert_a11y/templates/a11y/axe.js
2 changes: 1 addition & 1 deletion DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# developing and using the `nbconvert_html5` python module
# developing and using the `nbconvert_a11y` python module

this project digs hooks into `nbconvert` to modify the accessible experience for static jupyter notebooks.

Expand Down
10 changes: 5 additions & 5 deletions dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
HTML = EXPORTS / "html"
AUDITS = EXPORTS / "audits"
REPORTS = EXPORTS / "reports"
TEMPLATES = Path("nbconvert_html5/templates/a11y")
TEMPLATES = Path("nbconvert_a11y/templates/a11y")


def do(cmd, *args):
Expand Down Expand Up @@ -180,7 +180,7 @@ def readme(target, ext, title):
# )

# if audit:
# from nbconvert_html5.audit import main
# from nbconvert_a11y.audit import main

# audits = [x["audit"] for x in configs]
# yield dict(
Expand Down Expand Up @@ -305,7 +305,7 @@ def readme(target):
body += f"* [{t.name}]({t.relative_to(target)})\n"
(target / "README.md").write_text(body)

from nbconvert_html5.audit import audit_one
from nbconvert_a11y.audit import audit_one

targets = []
for x in Path(html_dir).rglob("*.html"):
Expand Down Expand Up @@ -365,7 +365,7 @@ def task_report():
# ]
# )
# def task_audit(dir, folder="audit"):
# from nbconvert_html5.audit import audit_one
# from nbconvert_a11y.audit import audit_one
# for x in Path(dir).rglob("*.html"):
# a = x.parent / folder / x.name
# yield dict(
Expand Down Expand Up @@ -413,7 +413,7 @@ def task_report():

# rel_targets = [x.parent / "data" / ("axe-" + x.name + ".json") for x in rel]
# if audit:
# from nbconvert_html5.audit import main
# from nbconvert_a11y.audit import main

# yield dict(
# name=f"audit",
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ nav:
- exports/reports/experiment.md
- exports/reports/notebooks.md
- exports/reports/configs.md
- nbconvert_html5 module:
- nbconvert_html5.md
- nbconvert_a11y module:
- nbconvert_a11y.md
- Notebooks for all media: media.md

hooks:
Expand Down
2 changes: 1 addition & 1 deletion nbconvert_html5/__init__.py → nbconvert_a11y/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
we found that nbconvert's configuration system was valuable for recording
the state of manual testing sessions.
we called this library `nbconvert_html5` because we hope discover html5 patterns
we called this library `nbconvert_a11y` because we hope discover html5 patterns
that offer a POUR notebook reading experience for assistive tech.
"""
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from attr import dataclass
from pytest import fixture, mark, param

NBCONVERT_HTML5_DYNAMIC_TEST = "NBCONVERT_HTML5_DYNAMIC_TEST"
nbconvert_a11y_DYNAMIC_TEST = "nbconvert_a11y_DYNAMIC_TEST"

axe_config_aa = {
"runOnly": ["act", "best-practice", "experimental", "wcag21a", "wcag21aa", "wcag22aa"],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
101 changes: 101 additions & 0 deletions nbconvert_a11y/templates/a11y/settings.jsonschema
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"title": "nb-settings",
"description": "application level settings",
"$comment": "these settings are independent of content.",
"type": [
"null",
"object"
],
"properties": {
"color": {
"title": "color settings",
"description": "modify color scheme, accent colors, and apply color filters",
"properties": {
"type": "object",
"scheme": {
"type": [
"null",
"string"
],
"description": "light mode or dark mode.",
"enum": [
null,
"light",
"dark"
],
"default": null
},
"accent": {
"description": "accent color for interactive elements",
"format": "color",
"type": "string"
},
"filters": {
"description": "color filters",
"properties": {
"invert": {
"description": "invert all colors",
"type": "boolean",
"default": false
},
"sepia": {
"description": "apply a sepia filter to all the contents",
"type": "boolean",
"default": false
}
}
}
}
},
"layout": {
"type": "object",
"description": "configure text and layout settings",
"properties": {
"margin": {
"description": "increase or decrease viewport margins",
"type": "integer",
"multipleOf": 5,
"minimum": 0,
"maximum": 40
},
"font-size": {
"description": "make the font size smaller or larger",
"type": "string",
"enum": [
"xx-small",
"x-small",
"small",
"medium",
"large",
"x-large",
"xx-large"
],
"default": "medium"
},
"serif": {
"description": "include extra serif strokes on letters",
"$comment": "serifs improve readability on larger screens",
"type": "boolean",
"default": true
}
}
},
"sound": {
"description": "configure sound effects and screen settings",
"properties": {
"role": {
"description": "screen reader's primary navigation mode",
"default": "list",
"enum": [
"list", "table", "landmark"
]
},
"synthetic": {
"description": "activate synthetic speech",
"type": "boolean",
"default": false
}
}
}
}
}
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit dd5f0c2

Please sign in to comment.