diff --git a/nbconvert_a11y/exporter.py b/nbconvert_a11y/exporter.py index 86eaff40..b4d8b5cd 100644 --- a/nbconvert_a11y/exporter.py +++ b/nbconvert_a11y/exporter.py @@ -87,6 +87,8 @@ class A11yExporter(PostProcess, HTMLExporter): include_cell_index = Bool( True, help="show the ordinal cell index, typically this is ignored from notebooks." ).tag(config=True) + include_visibility = Bool(False, help="include visibility toggle").tag(config=True) + include_upload = Bool(False, help="include template for uploading new content").tag(config=True) exclude_anchor_links = Bool(True).tag(config=True) code_theme = Enum(list(THEMES), "gh-high", help="an accessible pygments dark/light theme").tag( config=True @@ -130,6 +132,8 @@ def from_notebook_node(self, nb, resources=None, **kw): resources["include_settings"] = self.include_settings resources["include_help"] = self.include_help resources["include_toc"] = self.include_toc + resources["include_visibility"] = self.include_upload + resources["include_upload"] = self.include_upload resources["wcag_priority"] = self.wcag_priority resources["accesskey_navigation"] = self.accesskey_navigation resources["code_theme"] = THEMES[self.code_theme] diff --git a/nbconvert_a11y/templates/a11y/base.html.j2 b/nbconvert_a11y/templates/a11y/base.html.j2 index 4e06990a..1f7f5a1b 100644 --- a/nbconvert_a11y/templates/a11y/base.html.j2 +++ b/nbconvert_a11y/templates/a11y/base.html.j2 @@ -62,7 +62,7 @@ the notebook experiennce from browse to edit/focus mode. settings, help, & diagnostics {% if resources.include_settings %}{% include "a11y/components/settings.html.j2" %}{% endif %} - {% include "a11y/components/visibility.html.j2"%} + {% if resources.include_visibility %}{% include "a11y/components/visibility.html.j2"%}{% endif %} {% if resources.include_help %}{% include "a11y/components/help.html.j2" %}{% endif %} {% if resources.include_axe %}{% include "a11y/components/audit.html.j2" %}{% endif %} {# make the individual settings discoverable before all the settings @@ -70,7 +70,9 @@ the notebook experiennce from browse to edit/focus mode. {% if resources.include_settings %} {% endif %} - + {% if resources.include_visibility %} + {% endif %} {% if resources.include_axe %}{% endif %} {% if resources.include_help %}