Skip to content

Commit

Permalink
Add APR rating descriptive text for assistive technologies, wrap APR …
Browse files Browse the repository at this point in the history
…ratings in <dl>
  • Loading branch information
contolini committed May 21, 2024
1 parent 44cef70 commit f1a4f16
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cfgov/tccp/jinja2/tccp/includes/apr_rating.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
{% for i in range(rating + 1) -%}
{{ svg_icon("dollar-round") }}
{%- endfor %}
<span class="u-visually-hidden">
{{ rating + 1 }} dollar sign symbol{{ (rating + 1) | pluralize() }}
</span>
</dt>
<dd>
Pay {{ label }} interest
Expand Down
2 changes: 2 additions & 0 deletions cfgov/tccp/jinja2/tccp/includes/apr_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
{% if show_comparison %}
<td>
{% if tier_apr_rating is not none -%}
<dl>
{{ apr_rating(tier_apr_rating) }}
</dl>
{%- endif %}
</td>
{% endif %}
Expand Down
4 changes: 3 additions & 1 deletion cfgov/tccp/jinja2/tccp/includes/card_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ <h2>Cards you're looking for have these features:</h2>
<h3 class="m-card__heading">{{ card.institution_name }}</h3>
<p class="m-card__subtitle">{{ card.product_name }}</p>
</div>
{{ apr_rating(card.purchase_apr_for_tier_rating) }}
<dl>
{{ apr_rating(card.purchase_apr_for_tier_rating) }}
</dl>
<dl class="m-data-specs">
<div class="m-data-spec m-data-spec--apr">
<dt><strong>Purchase APR</strong></dt>
Expand Down

0 comments on commit f1a4f16

Please sign in to comment.