Skip to content

Commit d64b641

Browse files
committed
TD-4079: Form elements should have an id attribute
1 parent 1508bc7 commit d64b641

File tree

12 files changed

+30
-28
lines changed

12 files changed

+30
-28
lines changed

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAssessmentSettings.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
<div class="d-flex">
2424
<div class="selection pr-50">
2525
<div class="mb-4">Allow the learner to work through the assessment pages in any order.</div>
26-
<label class="my-0 label-text">
27-
<input class="radio-button" type="radio" :value="false" v-model="assessmentDetails.answerInOrder"/>
26+
<label class="my-0 label-text" for="yes">
27+
<input class="radio-button" type="radio" :value="false" id="yes" v-model="assessmentDetails.answerInOrder"/>
2828
Yes
2929
</label>
30-
<label class="my-0 pl-5 label-text">
31-
<input class="radio-button" type="radio" :value="true" v-model="assessmentDetails.answerInOrder"/>
30+
<label class="my-0 pl-5 label-text" for="no">
31+
<input class="radio-button" type="radio" :value="true" id="no" v-model="assessmentDetails.answerInOrder"/>
3232
No
3333
</label>
3434
</div>
@@ -74,7 +74,9 @@
7474
<ckeditorwithhint v-on:blur="setEndGuidance"
7575
v-on:inputValidity="setGuidanceValidity"
7676
:maxLength="1000"
77-
:initialValue="endGuidance" />
77+
:initialValue="endGuidance"
78+
:for="guidance"
79+
:id="guidance"/>
7880
</div>
7981
<div class="tip">
8082
<h3>Tip</h3>

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeAuthorsTab.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414

1515
<div v-if="resourceAuthors.length < maxAllowedAuthors" class="mb-40">
1616
<LinkTextAndIcon v-if="!isAdding"
17-
v-on:click="isAdding = true"
17+
v-on:click="isAdding = true"Please choose...
1818
class="contribute-authors-tab-add-button">
1919
<i class="fa-solid fa-plus"></i> Add author
2020
</LinkTextAndIcon>
2121

2222
<div v-if="isAdding">
2323
<div class="mt-5" v-if="!isCurrentUserSavedAsAuthor">
24-
<label class="checkContainer">
24+
<label class="checkContainer" for="currentUserAuthor">
2525
I am the author or co-author
26-
<input type="checkbox" v-model="authorIsContributor" v-on:change="currentUserAuthorChange">
26+
<input type="checkbox" id="currentUserAuthor" v-model="authorIsContributor" v-on:change="currentUserAuthorChange">
2727
<span class="checkmark"></span>
2828
</label>
2929
</div>

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/ContributeLicenceTab.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<a v-bind:href="moreInfoLink" class="mb-10 accessible-link" target="_blank">More information on licences</a>
99
</div>
1010

11-
<select class="form-control" aria-labelledby="licence-heading" v-model="resourceDetails.resourceLicenceId">
12-
<option disabled v-bind:value="null">Please choose...</option>
13-
<option v-for="licence in licences" :value="licence.id">
11+
<select class="form-control" aria-labelledby="licence-heading" id="licence" v-model="resourceDetails.resourceLicenceId">
12+
<option disabled v-bind:value="null" id="select">Please choose...</option>
13+
<option v-for="licence in licences" :value="licence.id" :id="licence.id">
1414
{{licence.title}}
1515
</option>
1616
</select>

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<CatalogueSelectorAccordion/>
66

77
<div class="form-group">
8-
<select class="form-control" aria-labelledby="primary-catalogue-heading" v-model="selectedCatalogue" @change="catalogueChange">
8+
<select class="form-control" aria-labelledby="primary-catalogue-heading" id="catalogue" v-model="selectedCatalogue" @change="catalogueChange">
99
<option disabled v-bind:value="{ nodeId: 0 }">Please choose...</option>
1010
<option v-for="catalogue in userCatalogues" :value="catalogue">
1111
{{getCatalogueName(catalogue)}}

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/SensitiveContentTickBox.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
</div>
1212

1313
<div class="mt-3">
14-
<label class="checkContainer mb-0">
14+
<label class="checkContainer mb-0" for="sensitivecontent">
1515
Yes
16-
<input type="checkbox" v-model="resourceDetails.sensitiveContent">
16+
<input type="checkbox" id="sensitivecontent" v-model="resourceDetails.sensitiveContent">
1717
<span class="checkmark"></span>
1818
</label>
1919
</div>

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/questions/AllowReveal.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
</div>
77
<form>
88

9-
<label class="my-0">
10-
<input class="radio-button" type="radio" :value="false" v-model="questionBlock.allowReveal"/>
9+
<label class="my-0" for="no">
10+
<input class="radio-button" type="radio" :value="false" v-model="questionBlock.allowReveal" id="no"/>
1111
No
1212
</label>
1313
<br>
14-
<label class="my-0">
15-
<input class="radio-button" type="radio" :value="true" v-model="questionBlock.allowReveal"/>
14+
<label class="my-0" for="yes">
15+
<input class="radio-button" type="radio" :value="true" v-model="questionBlock.allowReveal" id="yes"/>
1616
Yes
1717
</label>
1818
</form>

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/questions/SingleChoiceAnswer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<hr class="cutoff-line">
2828
</div>
2929
<div>
30-
<input type="text" aria-describedby="messageError" class="form-control text-input" maxlength="120" v-model="message" />
30+
<input type="text" id="txtmessage" aria-describedby="messageError" class="form-control text-input" maxlength="120" v-model="message" />
3131
<div class="footer-text" id="messageError">
3232
You have {{ charactersRemaining }} characters remaining.
3333
</div>

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
<div class="row">
3838
<div class="form-group col-12">
39-
<select class="form-control" aria-labelledby="type-label" v-model="selectedCatalogue" @change="catalogueChange">
39+
<select class="form-control" aria-labelledby="type-label" id="catalogue" v-model="selectedCatalogue" @change="catalogueChange">
4040
<option disabled v-bind:value="{ nodeId: 0 }">Please choose...</option>
4141
<option v-for="catalogue in userCatalogues" :value="catalogue">
4242
{{getCatalogueName(catalogue)}}

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/Content.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
</div>
7272
<div class="row">
7373
<div class="form-group col-12">
74-
<select class="form-control" aria-labelledby="type-label" v-model="selectUploadResourceType" @change="onUploadResourceTypeChange">
74+
<select class="form-control" aria-labelledby="type-label" id="uploadResourceTypes" v-model="selectUploadResourceType" @change="onUploadResourceTypeChange">
7575
<option disabled v-bind:value="0">Please choose...</option>
7676
<option v-for="option in uploadResourceTypes" :value="option.id">
7777
{{ option.description }}
@@ -359,7 +359,7 @@
359359
<div>
360360
<div class="modal-section-header"><label for="notes">Notes</label></div>
361361
<p class="mt-1">Provide information to help learners understand why this new version has been created.</p>
362-
<textarea class="form-control"id="notes" v-bind:class="{ 'input-validation-error': $v.publishNotes.$invalid && $v.publishNotes.$dirty }" rows="4" maxlength="4000" v-model="publishNotes"></textarea>
362+
<textarea class="form-control" id="notes" v-bind:class="{ 'input-validation-error': $v.publishNotes.$invalid && $v.publishNotes.$dirty }" rows="4" maxlength="4000" v-model="publishNotes"></textarea>
363363
<div class="error-text pt-3" v-if="$v.publishNotes.$invalid && $v.publishNotes.$dirty">
364364
<span class="text-danger">Enter notes.</span>
365365
</div>

LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/ContentCommon.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@
6666
<div class="bg-grey-white">
6767
Do you want learners to be notified that this resource contains sensitive content, which they may find offensive or disturbing, before they access it?
6868
<div class="mt-3">
69-
<label class="checkContainer mb-0">
69+
<label class="checkContainer mb-0" for="sensitivecontent">
7070
Yes
71-
<input type="checkbox" v-model="sensitiveContent" @click="setSensitiveContent($event.target.checked)">
71+
<input type="checkbox" id="sensitivecontent" v-model="sensitiveContent" @click="setSensitiveContent($event.target.checked)">
7272
<span class="checkmark"></span>
7373
</label>
7474
</div>
@@ -151,9 +151,9 @@
151151
</div>
152152
<div v-if="!userIsAuthor && authors.length < maxAllowedAuthors" class="col-12 mb-3">
153153
<div>
154-
<label class="checkContainer">
154+
<label class="checkContainer" for="currentUserAuthor">
155155
I am the author or co-author
156-
<input type="checkbox" v-model="currentUserAuthor" @change="currentUserAuthorChange">
156+
<input type="checkbox" id="currentUserAuthor" v-model="currentUserAuthor" @change="currentUserAuthorChange">
157157
<span class="checkmark"></span>
158158
</label>
159159
</div>

0 commit comments

Comments
 (0)