Skip to content

Commit

Permalink
fix course card not keyboard accessible issue (#2105)
Browse files Browse the repository at this point in the history
* fix course card not keyboard accessible issue

* address comment
  • Loading branch information
rachellougee authored Feb 16, 2024
1 parent 3086a99 commit c356edc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cms/templates/course_list_card.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<ul>
{% for card in cards %}
<li onClick="javascript:window.open('{{card.course.page.url}}');">
<li>
<a href="{{card.course.page.url}}" class="program-course-card-link">
<div class="program-course-card">
<div class="image">
<img src="{{card.featured_image}}" alt="">
Expand All @@ -13,6 +14,7 @@
<h3 class="title">{{card.course.title}}</h3>
</div>
</div>
</a>
</li>
{% endfor %}
</ul>
6 changes: 6 additions & 0 deletions frontend/public/scss/product-page/program-courses.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ body.new-design {
}
}
}

.program-course-card-link {
text-decoration: none;
display: block;
width: fit-content;
}
}
}
}

0 comments on commit c356edc

Please sign in to comment.