Skip to content

Commit

Permalink
Fix mispalced label tag in icon links component (#1300)
Browse files Browse the repository at this point in the history
* Remove misplaced label tag in icon-links component

* Update test for icon links
  • Loading branch information
vkbo committed Apr 17, 2023
1 parent cbebfc9 commit cc8a529
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{% set attributeString = attributeString | join(" ") -%}
<a {{ attributeString }}>
{%- if type == "fontawesome" -%}
<span><i class="{{ icon }} fa-lg"></i></span>
<label class="sr-only">{{ name }}</label>
<span><i class="{{ icon }} fa-lg" aria-hidden="true"></i></span>
<span class="sr-only">{{ name }}</span>
{%- elif type == "local" -%}
<img src="{{ pathto(icon, 1) }}" class="icon-link-image" alt="{{ name }}"/>
{%- elif type == "url" -%}
Expand Down
18 changes: 9 additions & 9 deletions tests/test_build/navbar_icon_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
<li class="nav-item">
<a class="nav-link" data-bs-placement="bottom" data-bs-toggle="tooltip" href="https://site1.org" rel="noopener" target="_blank" title="FONTAWESOME">
<span>
<i class="FACLASS fa-lg">
<i aria-hidden="true" class="FACLASS fa-lg">
</i>
</span>
<label class="sr-only">
<span class="sr-only">
FONTAWESOME
</label>
</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-placement="bottom" data-bs-toggle="tooltip" href="https://site2.org" rel="noopener" target="_blank" title="FONTAWESOME DEFAULT">
<span>
<i class="FADEFAULTCLASS fa-lg">
<i aria-hidden="true" class="FADEFAULTCLASS fa-lg">
</i>
</span>
<label class="sr-only">
<span class="sr-only">
FONTAWESOME DEFAULT
</label>
</span>
</a>
</li>
<li class="nav-item">
Expand All @@ -41,12 +41,12 @@
<li class="nav-item">
<a class="overridden classes" data-bs-placement="bottom" data-bs-toggle="tooltip" foo="bar" href="https://override.com" rel="noopener" target="_blank" title="FONTAWESOME">
<span>
<i class="FACLASS fa-lg">
<i aria-hidden="true" class="FACLASS fa-lg">
</i>
</span>
<label class="sr-only">
<span class="sr-only">
FONTAWESOME
</label>
</span>
</a>
</li>
</ul>

0 comments on commit cc8a529

Please sign in to comment.