Skip to content

Commit

Permalink
mv label outside region and data to region
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfast committed Jun 29, 2023
1 parent 02614f1 commit f34aeda
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions nbconvert_html5/templates/semantic-forms/smol.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
padding-right: 16px;
}
label[id$=\/form_label],
label[id$=\/cell_label],
fieldset[name=input]:disabled~ul[role=toolbar],
fieldset[name=input]>legend,
fieldset[name=outputs]>legend,
article>form[action=markdown]~fieldset[name=input]:disabled,
article[data-outputs="0"]>fieldset[name=outputs] {
section>form[action=markdown]~fieldset[name=input]:disabled,
section[data-outputs="0"]>fieldset[name=outputs] {
display: none;
}
Expand Down Expand Up @@ -100,15 +100,14 @@
{% if cell.cell_type == "raw" %}{{cell.source}}{% endif %}
<article {% if not ct.sloc and not cell.outputs %}role="separator"{% endif %}
class="cell {{cell.cell_type}}{% if tags %} {{tags}}{% endif %}" id="{{count}}"
data-sloc="{{ct.sloc}}" data-outputs="{{(cell.outputs or "").__len__()}}"
aria-labelledby={{ID}}/form_label
aria-labelledby={{ID}}/cell_label
aria-posinset="{{count + 1}}" aria-setsize="{{nb.cells.__len__()}}">
<section aria-labelledby={{ID}}/cell_label>
<label id={{ID}}/cell_label>{{cell.cell_type}}<span>Cell</span><output id={{ID}}/cell_count name="cell_count" role="presentation">{{count + 1}}</output></label>
<a aria-hidden="true" href="#{{count + 1}}" tabindex="-1" alt="Cell {{count + 1}}" title="Cell {{count + 1}}">{{count + 1}}</a>
<section aria-labelledby={{ID}}/cell_label data-sloc="{{ct.sloc}}" data-outputs="{{(cell.outputs or "").__len__()}}">
{# the form doubles as an anchor #}
<form id="{{ID}}" name="{{ID}}" method="POST" action="{{cell.cell_type}}">
</form>
<label id={{ID}}/cell_label>{{cell.cell_type}}<span>Cell</span><output id={{ID}}/cell_count name="cell_count" role="presentation">{{count + 1}}</output></label>
<a aria-hidden="true" href="#{{count + 1}}" tabindex="-1" alt="Cell {{count + 1}}" title="Cell {{count + 1}}">{{count + 1}}</a>
<fieldset name=input role=presentation disabled>
<legend id={{ID}}/input_count>In&nbsp;<output name="input_count" role="presentation">{{cell.execution_count or ""}}</output></legend>
<label aria-hidden=true>In&nbsp;<output name="input_count" role="presentation">{{cell.execution_count or ""}}</output></label>
Expand Down

0 comments on commit f34aeda

Please sign in to comment.