Skip to content

Commit b318bb3

Browse files
authored
Merge pull request #731 from TechnologyEnhancedLearning/Develop/Fixes/TD-4079-DIG301-Form-fields-are-not-associated-with-text-labels
TD:4079: DIG301: Form fields are not associated with text labels
2 parents 3f021d0 + 1508bc7 commit b318bb3

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<input id="newKeyword" aria-labelledby="keyword-label" type="text" class="form-control" maxlength="260" v-model="newKeyword" v-bind:class="{ 'input-validation-error': keywordError }" @input="keywordError=false" @change="keywordChange" />
2020
<button type="button" class="nhsuk-button nhsuk-button--secondary ml-3 button_width nhsuk-u-margin-bottom-0" @click="addKeyword">&nbsp;Add</button>
2121
</div>
22-
<div class="col-12 footer-text">
22+
<div class="col-12 footer-text" id="keyword-label">
2323
You can enter a maximum of 50 characters per keyword
2424
</div>
2525
</div>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
<hr class="cutoff-line">
2828
</div>
2929
<div>
30-
<label class="nhsuk-u-visually-hidden" for="message"></label>
31-
<input type="text" id="message" name="message" aria-describedby="messageError" class="form-control text-input" maxlength="120" v-model="message" />
30+
<input type="text" aria-describedby="messageError" class="form-control text-input" maxlength="120" v-model="message" />
3231
<div class="footer-text" id="messageError">
3332
You have {{ charactersRemaining }} characters remaining.
3433
</div>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<span class="text-danger">The keyword(s) have already been added : {{formattedkeywordErrorMessage}}</span>
8888
</div>
8989
<div class="col-12 mb-0 error-text" v-if="keywordLengthExceeded">
90-
<span class="text-danger">
90+
<span class="text-danger" id="keyword-label">
9191
Each keyword must be no longer than 50 characters.
9292
</span>
9393
</div>
@@ -99,7 +99,7 @@
9999
<input id="newKeyword" aria-labelledby="keyword-label" aria-describedby="keyworddesc" type="text" class="form-control" maxlength="260" v-model="newKeyword" v-bind:class="{ 'input-validation-error': keywordError }" @input="keywordError=false" @change="keywordChange" />
100100
<button type="button" class="nhsuk-button nhsuk-button--secondary ml-3 nhsuk-u-margin-bottom-0" @click="addKeyword">&nbsp;Add</button>
101101
</div>
102-
<div class="col-12 footer-text">
102+
<div class="col-12 footer-text" id="keyword-label">
103103
You can enter a maximum of 50 characters per keyword
104104
</div>
105105
</div>

LearningHub.Nhs.WebUI/Views/Shared/Components/NavigationItems/MobileTopRightNav.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ else
2424
<div class="nhsuk-header__mobile-break"></div>
2525
@if (Model.ShowSearch)
2626
{
27-
<label class="nhsuk-header__search-toggle" id="toggle-search" aria-controls="search" aria-label="Open search">
27+
<button class="nhsuk-header__search-toggle" id="toggle-search" aria-controls="search" aria-label="Open search">
2828
<svg class="nhsuk-icon nhsuk-icon__search" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false" width="27" height="27">
2929
<path d="M19.71 18.29l-4.11-4.1a7 7 0 1 0-1.41 1.41l4.1 4.11a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zM5 10a5 5 0 1 1 5 5 5 5 0 0 1-5-5z"></path>
3030
</svg>
3131
<span class="nhsuk-u-visually-hidden">Search</span>
32-
</label>
32+
</button>
3333
}
3434
}
3535

LearningHub.Nhs.WebUI/Views/Shared/_NavPartial.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@
4949

5050
</div>
5151
@if (User.Identity.IsAuthenticated) {
52-
<input type="checkbox" id="header-dropdown-menu-control" aria-labelledby="Main navigation menu" role="button">
52+
<input type="checkbox" id="header-dropdown-menu-control" aria-labelledby="label-navigation" role="button">
5353
<nav class="nhsuk-header__navigation app-width-container" id="header-navigation" role="navigation" aria-label="Primary navigation" aria-labelledby="label-navigation">
5454
<p class="nhsuk-header__navigation-title"><span id="label-navigation">Menu</span>
55-
<label class="nhsuk-header__navigation-close" id="close-menu">
55+
<button class="nhsuk-header__navigation-close" id="close-menu">
5656
<svg class="nhsuk-icon nhsuk-icon__close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false" width="27" height="27">
5757
<path d="M13.41 12l5.3-5.29a1 1 0 1 0-1.42-1.42L12 10.59l-5.29-5.3a1 1 0 0 0-1.42 1.42l5.3 5.29-5.3 5.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l5.29-5.3 5.29 5.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"></path>
5858
</svg>
5959
<span class="nhsuk-u-visually-hidden">Close menu</span>
60-
</label>
60+
</button>
6161
</p>
6262
<ul class="nhsuk-header__navigation-list @BasicUserPaddingClass()">
6363
@await Component.InvokeAsync("NavigationItems")

0 commit comments

Comments
 (0)