From f83407479a47da5ea92245e13bd4346fa306ef17 Mon Sep 17 00:00:00 2001 From: Ben Meyrick Date: Fri, 15 Feb 2019 12:21:53 +0000 Subject: [PATCH] Only add title attribute to input if prefixed or suffixed (#180) --- src/components/input/_template.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/input/_template.njk b/src/components/input/_template.njk index 138916187f..3b1e913881 100644 --- a/src/components/input/_template.njk +++ b/src/components/input/_template.njk @@ -43,7 +43,7 @@ type="{{ type }}" id="{{ params.id }}" class="input input--text input-type__input {{ params.classes }}{{ exclusiveClass }}" - title="{{ params.prefix.title }}{{ params.suffix.title }}" + {% if params.prefix or params.suffix %}title="{{ params.prefix.title }}{{ params.suffix.title }}"{% endif %} {% if params.name !== undefined %}name="{{ params.name }}"{% endif %} {% if params.value !== undefined %}value="{{ params.value }}"{% endif %} {% if params.accept !== undefined %}accept="{{ params.accept }}"{% endif %}