Skip to content

Commit

Permalink
remove screen reader verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfast committed May 31, 2023
1 parent 27b4490 commit 58a67be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nbconvert_html5/templates/semantic-forms/cell.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,15 @@ of the execution count label on different elements with different roles.
{%- macro cell_render(cell, nb, parts) -%}
{%- set count = nb["cells"].index(cell)-%}{%- set ID = "/cells/" + str(count) -%}
{% set CODE = cell.cell_type=="code" %}
<output role="presentation" class="render" for="{{ID}}/source" form={{ID}} aria-labelledby="{{ID}}/execution_count">
<output role="presentation" class="render" form={{ID}} aria-labelledby="{{ID}}/execution_count">
{%- if CODE -%}{{ cell.source | highlight_code(metadata=cell.metadata) }}{% else %}{{markdown(cell.source) |
strip_files_prefix}}{%- endif -%}
</output>
{%- endmacro -%}

{%- macro cell_display_priority(cell, ID) -%}
{%- for i, output in enumerate(cell.outputs) -%}
{%- block output scoped -%}<output role="presentation" name="outputs/{{i}}" id="{{ID}}/outputs/{{i}}" form="{{ID}}"
for="{{ID}}/source" aria-labelledby="{{ID}}/execution_count">{%- block output_prompt -%}{%- endblock
{%- block output scoped -%}<output role="presentation" name="outputs/{{i}}" id="{{ID}}/outputs/{{i}}" form="{{ID}}" aria-labelledby="{{ID}}/execution_count">{%- block output_prompt -%}{%- endblock
-%}{{super()}}</output>{%- endblock -%}
{%- endfor -%}
{%- endmacro -%}
Expand Down

0 comments on commit 58a67be

Please sign in to comment.