Skip to content

Commit 55917f3

Browse files
committed
Add labels for some inputs on issue.item.
This should handle all labels that are static and not generated by a call to db.user.classhelp. Cleans up some accessibility issues reported by lighthouse.
1 parent 9766759 commit 55917f3

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

website/issues/html/issue.item.html

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<fieldset><legend>classification</legend>
4242
<table class="form">
4343
<tr>
44-
<th class="required" i18n:translate="">Title:</th>
44+
<th class="required"><label for="title" i18n:translate="">Title:</label></th>
4545
<td colspan="3" tal:condition="context/title/is_edit_ok"
4646
tal:content="structure python:context.title.field(size=60)">title</td>
4747
<td colspan="3" tal:condition="not:context/title/is_edit_ok">
@@ -81,13 +81,12 @@
8181
<span tal:replace="structure python:db.status.classhelp('id,name,description',label='Status')" />:
8282
</th>
8383
<td tal:content="structure context/status/menu">status</td>
84-
<th i18n:translate="">Resolution:</th>
84+
<th><label for="resolution" i18n:translate="">Resolution:</label></th>
8585
<td tal:content="structure context/resolution/menu">resolution</td>
8686
</tr>
8787

8888
<tr tal:condition="context/id">
89-
<th>
90-
<tal:block i18n:translate="">Dependencies</tal:block>:
89+
<th> <label for="dependencies" i18n:translate="">Dependencies</label>
9190
<span tal:condition="context/dependencies/is_edit_ok"
9291
tal:replace="structure python:db.issue.classhelp('id,title', filter='status=0,1', property='dependencies')" />
9392
</th>
@@ -97,8 +96,8 @@
9796
<br/>View: <a tal:attributes="href string:issue${d/id}" tal:content="d/id"></a>
9897
</span>
9998
</td>
100-
<th i18n:translate="">
101-
<tal:block i18n:translate="">Superseder</tal:block>:
99+
<th>
100+
<tal:block><label for="superseder" i18n:translate="">Superseder</label></tal:block>:
102101
<span tal:condition="context/superseder/is_edit_ok"
103102
tal:replace="structure python:db.issue.classhelp('id,title', filter='status=0,1', property='superseder')" />
104103
</th>
@@ -116,7 +115,7 @@
116115
</td>
117116
</tr>
118117
<tr>
119-
<th><tal:block i18n:translate="">Assigned To</tal:block>:</th>
118+
<th><label for="assignee" i18n:translate="">Assigned To</label>:</th>
120119
<td tal:condition="context/status/is_edit_ok">
121120
<select name="assignee">
122121
<option value="-1">nobody</option>
@@ -130,7 +129,7 @@
130129
<td tal:condition="not:context/assignee/is_edit_ok">
131130
<span tal:replace="structure context/assignee/plain" />
132131
</td>
133-
<th><tal:block i18n:translate="">Nosy List</tal:block>:
132+
<th><label for="nosy" i18n:translate="">Nosy List</label>:
134133
<span tal:condition="context/nosy/is_edit_ok"
135134
tal:replace="structure python:db.user.classhelp('username,realname,address', property='nosy')" />
136135
</th>
@@ -149,22 +148,22 @@
149148

150149
</tr>
151150
<tr tal:condition="context/is_edit_ok">
152-
<th><tal:block i18n:translate="">Comment</tal:block>:</th>
151+
<th><label for="@note" i18n:translate="">Comment</label>:</th>
153152
<td colspan="3">
154153
<textarea tal:content="request/form/@note/value | default"
155154
name="@note" wrap="hard" rows="10" cols="72"></textarea>
156155
</td>
157156
</tr>
158157

159158
<tr tal:condition="context/is_edit_ok">
160-
<th><tal:block i18n:translate="">File</tal:block>:</th>
159+
<th><label for="file-1@content" i18n:translate="">File</label>:</th>
161160
<td colspan=3>
162161
<input type="hidden" name="@link@files" value="file-1">
163162
<input type="file" name="file-1@content" size="40">
164163
</td>
165164
</tr>
166165
<tr tal:condition="context/is_edit_ok">
167-
<th><tal:block i18n:translate="">File Description</tal:block>:</th>
166+
<th><label for="file-1@description" i18n:translate="">File Description</label>:</th>
168167
<td colspan=3><input type="edit" name="file-1@description" size="40"></td>
169168
</tr>
170169
</table>

0 commit comments

Comments
 (0)