Skip to content

Commit

Permalink
another var name fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccar committed Jul 4, 2024
1 parent 8a69c0c commit bda325c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/components/fieldset/_macro.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% from "components/error/_macro.njk" import onsError %}

{% macro onsFieldset(params) %}
{% set descriptionID = (params.id ~ "-" if params.id) ~ "legend-description" %}
{% set descriptionId = (params.id ~ "-" if params.id) ~ "legend-description" %}
{%- set fieldset -%}
{%- if params.dontWrap -%}
<div class="ons-input-items">{{- caller() if caller -}}</div>
Expand All @@ -12,7 +12,7 @@
{% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}
>
<legend
{% if params.description %}aria-describedBy="{{ descriptionID }}"{% endif %}
{% if params.description %}aria-describedBy="{{ descriptionId }}"{% endif %}
class="ons-fieldset__legend{{ ' ons-u-mb-no' if params.legendIsQuestionTitle }}{{ ' ' + params.legendClasses if params.legendClasses else '' }}{{ ' ons-fieldset__legend--with-description' if params.description }}"
>
{%- if params.legendIsQuestionTitle -%}
Expand All @@ -28,7 +28,7 @@
</legend>
{%- if params.description -%}
<div
id="{{ descriptionID }}"
id="{{ descriptionId }}"
class="ons-fieldset__description{{ ' ons-fieldset__description--title ons-u-mb-m' if params.legendIsQuestionTitle }}"
>
{{- params.description | safe -}}
Expand Down
10 changes: 5 additions & 5 deletions src/components/label/_macro.njk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% macro onsLabel(params) %}
{% if params.id %}
{% set descriptionID = params.id ~ "-description-hint" %}
{% set descriptionId = params.id ~ "-description-hint" %}
{% else %}
{% set descriptionID = "description-hint" %}
{% set descriptionId = "description-hint" %}
{% endif %}

{% if params.inputType == "checkbox" or params.inputType == "radio" %}
Expand All @@ -13,7 +13,7 @@

{%- set description -%}
<span
{% if isCheckboxOrRadio == false %}id="{{ descriptionID }}"{% endif %}class="ons-label__description{% if params.inputType %}{{ ' ' }}ons-{{ params.inputType }}__label--with-description{% else %}{{ ' ' }}ons-input--with-description{% endif %}"
{% if isCheckboxOrRadio == false %}id="{{ descriptionId }}"{% endif %}class="ons-label__description{% if params.inputType %}{{ ' ' }}ons-{{ params.inputType }}__label--with-description{% else %}{{ ' ' }}ons-input--with-description{% endif %}"
>
{{- params.description -}}
</span>
Expand All @@ -29,14 +29,14 @@
{%- endset -%}

{%- set description -%}
<span class="ons-label__visually-hidden-description ons-u-vh" id="{{ descriptionID }}">{{- params.description -}}</span>
<span class="ons-label__visually-hidden-description ons-u-vh" id="{{ descriptionId }}">{{- params.description -}}</span>
{%- endset -%}
{%- endif -%}

<label
class="{{ 'ons-label' if params.inputType is not defined }}{{ ' ' + params.classes if params.classes else '' }}{{ ' ons-label--with-description' if params.description }}{{ ' ons-label--placeholder' if params.accessiblePlaceholder }}"
for="{{ params.for }}"
{% if params.description %}aria-describedby="{{ descriptionID }}"{% endif %}
{% if params.description %}aria-describedby="{{ descriptionId }}"{% endif %}
{% if params.id %}id="{{ params.id }}"{% endif %}
{% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}
>
Expand Down

0 comments on commit bda325c

Please sign in to comment.