Skip to content

Commit 844e3ce

Browse files
authored
Merge pull request #33 from TechnologyEnhancedLearning/TD-3341-add-placeholder-for-empty-label
Add placeholder for empty labels. Make empty labaels associated with Textnput visually hidden.
2 parents e41ce89 + f61da81 commit 844e3ce

File tree

1 file changed

+2
-2
lines changed
  • NHSUKViewComponents.Web/Views/Shared/Components/TextInput

1 file changed

+2
-2
lines changed

NHSUKViewComponents.Web/Views/Shared/Components/TextInput/Default.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
@using NHSUKViewComponents.Web.Helpers
33
@model TextInputViewModel
44
<div class="nhsuk-form-group @(Model.HasError ? "nhsuk-form-group--error" : "")">
5-
<label class="nhsuk-label" for="@Model.Name">
6-
@Model.Label
5+
<label class="nhsuk-label @(string.IsNullOrWhiteSpace(Model.Label) ? "nhsuk-u-visually-hidden" : "")" for="@Model.Name">
6+
@(string.IsNullOrWhiteSpace(Model.Label) ? "N/A" : @Model.Label)
77
</label>
88
@if (Model.HintText != null)
99
{

0 commit comments

Comments
 (0)