Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misplaced label tag in icon links component #1300

Merged
merged 2 commits into from Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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>