Skip to content

Commit

Permalink
remove aria-label from HTML if no aria-label value
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhunter08 committed Sep 10, 2024
1 parent b257f26 commit 7101942
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/card/card.njk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
{{ params.aboveContent.html | safe }}
</div>
{%- endif -%}
<a href="{{ params.href }}" class="nhsapp-card__link nhsuk-link--no-visited-state" aria-label="{{ params.linkAriaLabel }}">
<a href="{{ params.href }}" class="nhsapp-card__link nhsuk-link--no-visited-state"
{%- if params.linkAriaLabel %} aria-label="{{ params.linkAriaLabel }}" {% endif %}>
{{ params.title }}
</a>
{% if params.description %}
Expand Down

0 comments on commit 7101942

Please sign in to comment.