Skip to content

Commit

Permalink
fix accessibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
precious-onyenaucheya-ons committed Dec 4, 2024
1 parent 4ce8321 commit f6ab261
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
9 changes: 0 additions & 9 deletions src/components/description-list/_description-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,15 @@
gap: 0.5rem 2.5rem;

.ons-grid__col {
flex: none;
width: auto;
display: block;
}

.ons-description-list__value {
float: none;
grid-column: auto;
}

.ons-description-list__values {
display: flex;
flex-wrap: wrap;
}

.ons-description-list__term {
margin-right: 1rem;
grid-column: auto;
}
}
}
Expand Down
29 changes: 14 additions & 15 deletions src/components/description-list/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,20 @@
{{ item.term }}
</dt>
{% endif %}
<span class="ons-description-list__values">
{% for descriptionItem in item.descriptions %}
{% if descriptionItem.description | length %}
<dd
{% if descriptionItem.id %}id="{{ descriptionItem.id }}"{% endif %}
class="ons-description-list__value ons-grid__col ons-col-{{ params.descriptionCol }}@{{ 'xs@l' if params.variant == 'inline' else 'm' }}"
>
{{- descriptionItem.description -}}
{%- if params.variant == 'inline' and item.descriptions | length > 1 and loop.index != item.descriptions | length -%}
<span class="ons-description-list-inline-comma">, </span>
{% endif %}
</dd>
{% endif %}
{% endfor %}
</span>
{% for descriptionItem in item.descriptions %}
{% if descriptionItem.description | length %}
<dd
{% if descriptionItem.id %}id="{{ descriptionItem.id }}"{% endif %}
class="ons-description-list__value ons-grid__col ons-col-{{ params.descriptionCol }}@{{ 'xs@l' if params.variant == 'inline' else 'm' }}"
>
{{- descriptionItem.description -}}

{%- if params.variant == 'inline' and item.descriptions | length > 1 and loop.index != item.descriptions | length -%}
<span class="ons-description-list-inline-comma">, </span>
{% endif %}
</dd>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</dl>
Expand Down

0 comments on commit f6ab261

Please sign in to comment.