Skip to content

Commit

Permalink
improved accessible naming for resource icons in project pages (hackf…
Browse files Browse the repository at this point in the history
  • Loading branch information
terrencejihoonjung authored Jun 11, 2024
1 parent e971e5b commit ac65fb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _includes/resource-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{% assign image = include.image %}
{% assign name = include.name %}
{% assign lowercaseName = include.name | downcase %}
{% assign hyphenatedName = lowercaseName | replace: ' ', '-' %}


<a href="{{ url }}" class='resource-link' target="_blank" rel="noopener noreferrer">
<a href="{{ url }}" class='resource-link' target="_blank" rel="noopener noreferrer" aria-labelledby="resource-title-{{hyphenatedName}}">
<li class='resource-card'>
<!--Where the images will be-->
<div {% if image %} class='resource-img resource-img-provided' {% else %} role="img" aria-label="{{name}}" class='resource-img' {% endif %}>
Expand All @@ -22,11 +22,11 @@
</div>
<div class='resource-body'>
{% if lowercaseName == 'github' %}
<h4 class='resource-title'>
<h4 id="resource-title-{{hyphenatedName}}" class='resource-title'>
GitHub
</h4>
{% else %}
<h4 class='resource-title'>
<h4 id="resource-title-{{hyphenatedName}}" class='resource-title'>
{{ name }}
</h4>
{% endif %}
Expand Down

0 comments on commit ac65fb4

Please sign in to comment.