Skip to content

Commit da27859

Browse files
committed
more lighthouse fixes
Add id's to html input elements and wrap some additional labels with label tag with for attribute.
1 parent 55917f3 commit da27859

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

website/issues/html/issue.item.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<tr>
4444
<th class="required"><label for="title" i18n:translate="">Title:</label></th>
4545
<td colspan="3" tal:condition="context/title/is_edit_ok"
46-
tal:content="structure python:context.title.field(size=60)">title</td>
46+
tal:content="structure python:context.title.field(id='title', size=60)">title</td>
4747
<td colspan="3" tal:condition="not:context/title/is_edit_ok">
4848
<span tal:content="structure context/title/plain"/>
4949
<input type="hidden" name="title" tal:attributes="value context/title">
@@ -82,7 +82,7 @@
8282
</th>
8383
<td tal:content="structure context/status/menu">status</td>
8484
<th><label for="resolution" i18n:translate="">Resolution:</label></th>
85-
<td tal:content="structure context/resolution/menu">resolution</td>
85+
<td tal:content="structure python:context.resolution.menu(html_kwargs={'id':'resolution'})">resolution</td>
8686
</tr>
8787

8888
<tr tal:condition="context/id">
@@ -91,7 +91,7 @@
9191
tal:replace="structure python:db.issue.classhelp('id,title', filter='status=0,1', property='dependencies')" />
9292
</th>
9393
<td>
94-
<span tal:replace="structure python:context.dependencies.field(showid=1,size=20)" />
94+
<span tal:replace="structure python:context.dependencies.field(id='dependencies',showid=1,size=20)" />
9595
<span tal:condition="context/dependencies" tal:repeat="d python:context.dependencies.sorted('creation')">
9696
<br/>View: <a tal:attributes="href string:issue${d/id}" tal:content="d/id"></a>
9797
</span>
@@ -102,7 +102,7 @@
102102
tal:replace="structure python:db.issue.classhelp('id,title', filter='status=0,1', property='superseder')" />
103103
</th>
104104
<td>
105-
<span tal:replace="structure python:context.superseder.field(showid=1, size=20)" />
105+
<span tal:replace="structure python:context.superseder.field(id='superseder', showid=1, size=20)" />
106106
<span tal:condition="context/superseder">
107107
<!-- <br><span i18n:translate="">View</span>:
108108
<a tal:repeat="sup context/superseder"
@@ -117,7 +117,7 @@
117117
<tr>
118118
<th><label for="assignee" i18n:translate="">Assigned To</label>:</th>
119119
<td tal:condition="context/status/is_edit_ok">
120-
<select name="assignee">
120+
<select id="assignee" name="assignee">
121121
<option value="-1">nobody</option>
122122
<tal:block tal:repeat="userdata python:db._db.user.filter_sql('select id,_username from _user where _roles like \'%Developer%\' order by _username')">
123123
<option tal:attributes="value python:userdata[0];
@@ -134,37 +134,37 @@
134134
tal:replace="structure python:db.user.classhelp('username,realname,address', property='nosy')" />
135135
</th>
136136
<td>
137-
<span tal:replace="structure context/nosy/field" />
137+
<span tal:replace="structure python:context.nosy.field(id='nosy')" />
138138
</td>
139139
</tr>
140140
<tr>
141141
<th>
142142
<span tal:replace="structure python:db.priority.classhelp('id,name,description',label='Priority')" />:
143143
</th>
144144
<td tal:content="structure context/priority/menu">priority</td>
145-
<th i18n:translate="">Keywords:</th>
146-
<td tal:content="structure python:context['keywords'].menu(height=5)">keywords</td>
145+
<th><label for="keywords" i18n:translate="">Keywords</label>:</th>
146+
<td tal:content="structure python:context['keywords'].menu(height=5,html_kwargs={'id': 'keywords'})">keywords</td>
147147

148148

149149
</tr>
150150
<tr tal:condition="context/is_edit_ok">
151151
<th><label for="@note" i18n:translate="">Comment</label>:</th>
152152
<td colspan="3">
153153
<textarea tal:content="request/form/@note/value | default"
154-
name="@note" wrap="hard" rows="10" cols="72"></textarea>
154+
id="@note" name="@note" wrap="hard" rows="10" cols="72"></textarea>
155155
</td>
156156
</tr>
157157

158158
<tr tal:condition="context/is_edit_ok">
159159
<th><label for="file-1@content" i18n:translate="">File</label>:</th>
160160
<td colspan=3>
161161
<input type="hidden" name="@link@files" value="file-1">
162-
<input type="file" name="file-1@content" size="40">
162+
<input type="file" id="file-1@content" name="file-1@content" size="40">
163163
</td>
164164
</tr>
165165
<tr tal:condition="context/is_edit_ok">
166166
<th><label for="file-1@description" i18n:translate="">File Description</label>:</th>
167-
<td colspan=3><input type="edit" name="file-1@description" size="40"></td>
167+
<td colspan=3><input type="edit" id="file-1@description" name="file-1@description" size="40"></td>
168168
</tr>
169169
</table>
170170
</fieldset>

0 commit comments

Comments
 (0)