Skip to content

Commit

Permalink
Merge pull request #100 from collective/erral-a11y
Browse files Browse the repository at this point in the history
Accessibility improvements
  • Loading branch information
erral authored Jun 23, 2020
2 parents 85d0e6c + e9ee00f commit eb39ecc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
1.5.4 (unreleased)
------------------

- Nothing changed yet.
- Accesibility fixes.
[erral]


1.5.3 (2020-03-03)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,33 @@
<td class="datagridwidget-block-edit-cell">
<tal:block tal:repeat="widget view/subform/widgets/values">

<div tal:define="klass python: widget.klass or ''" tal:attributes="class python:'datagridwidget-block-' + widget.id + ' ' + klass + ' datagridwidget-widget-' + widget.field.__name__ + ' ' + (widget.mode == 'hidden' and 'datagridwidget-hidden-data' or 'datagridwidget-block')">
<div tal:define="klass python: widget.klass or '';
error python: widget.error and 'error' or ''"
tal:attributes="class python:'datagridwidget-block-' + widget.id + ' ' + klass + ' datagridwidget-widget-' + widget.field.__name__ + ' ' + error + ' ' + (widget.mode == 'hidden' and 'datagridwidget-hidden-data' or 'datagridwidget-block')">
<div class="label">
<label tal:attributes="for widget/id">
<span i18n:translate=""
tal:content="widget/label">label</span>
<span class="required"
tal:condition="widget/required" title="Required" i18n:domain="plone" i18n:attributes="title title_required">&nbsp;</span>

<span class="formHelp"
tal:define="description widget/field/description"
i18n:translate=""
tal:content="structure description"
tal:condition="python:description"
>field description</span>
</label>
</div>

<div tal:condition="widget/error"
tal:replace="structure widget/error/render">error</div>


<div class="fieldErrorBox" tal:condition="widget/error">
<span tal:replace="structure widget/error/render" />
</div>

<div tal:replace="structure widget/render" />

<div class="formHelp"
tal:define="description widget/field/description"
i18n:translate=""
tal:content="structure description"
tal:condition="python:description"
>field description</div>

</div>

Expand All @@ -46,6 +52,7 @@
<a href=""
onclick="dataGridField2Functions.addRowAfter(this); return false"
id="btn-addrow"
tal:attributes="id string:btn-addrow-${view/name}"
class="btn btn-default"
title=""
aria-label="Add row"
Expand All @@ -63,6 +70,7 @@
<a href=""
onclick="dataGridField2Functions.removeFieldRow(this);return false"
id="btn-deleterow"
tal:attributes="id string:btn-deleterow-${view/name}"
class="btn btn-default"
title=""
aria-label="Delete row"
Expand All @@ -81,6 +89,7 @@
<a href=""
onclick="dataGridField2Functions.moveRowUp(this);return false"
id="btn-moveup"
tal:attributes="id string:btn-moveup-${view/name}"
class="btn btn-default"
title=""
aria-label="Move Up"
Expand All @@ -98,6 +107,7 @@
<a href=""
onclick="dataGridField2Functions.moveRowDown(this);return false"
id="btn-movedown"
tal:attributes="id string:btn-movedown-${view/name}"
class="btn btn-default"
title=""
aria-label="Move Down"
Expand Down

0 comments on commit eb39ecc

Please sign in to comment.