Skip to content

Commit f61da81

Browse files
committed
Add placeholder for empty labels. Make empty labaels associated with Textnput visually hidden.
1 parent e41ce89 commit f61da81

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)