Skip to content

Commit

Permalink
Merge pull request #9874 from evanastevska/h6-to-h3
Browse files Browse the repository at this point in the history
Changed h6 to h3 in subject tags for better accessibility, and updated CSS
  • Loading branch information
jimchamp authored Sep 17, 2024
2 parents 16120e0 + 0d30cd4 commit 97c252d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion openlibrary/macros/RelatedSubjects.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ <h2>$_("Related...")</h2>

$for category, label, limit in subject_list:
<div class="contentQuarter link-box link-box--with-header">
<h6 class="black collapse uppercase">$label</h6>
<h3 class="black collapse uppercase">$label</h3>
$:renderSubjects(page[category][:limit])
</div>
2 changes: 1 addition & 1 deletion openlibrary/macros/SubjectTags.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$if subjects:
<div class="section link-box">
<span class="clamp" data-before="&#9656; ">
<h6>$label</h6>
<h3>$label</h3>
$for subject in subjects:
<a href="/subjects/$prefix$utf8(subject.lower().replace(' ', '_').replace(',', '').replace('/', ''))" data-ol-link-track="$track_value">$subject</a>$cond(not loop.last, ",", "")
</span>
Expand Down
2 changes: 1 addition & 1 deletion openlibrary/templates/publishers/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h2>$_("Common Subjects")

$for s, limit in subject_list:
<div class="contentQuarter link-box link-box--with-header">
<h6>$s</h6>
<h3>$s</h3>
$:renderSubjects(page[s][:limit])
</div>
$if s != 'times':
Expand Down
2 changes: 1 addition & 1 deletion openlibrary/templates/type/author/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h2 class="collapse">
$def render_subjects(label, subjects, prefix):
$if subjects:
<div class="section link-box link-box--with-header">
<h6 class="collapse black uppercase">$label</h6>
<h3 class="collapse black uppercase">$label</h3>
$for _, subject, count in subjects:
<a itemprop="knowsAbout" href="/subjects/$prefix$subject.lower().replace(' ', '_')">$subject</a>$cond(not loop.last, ",", "")
</div>
Expand Down
4 changes: 2 additions & 2 deletions static/css/components/link-box.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
white-space: normal;
word-wrap: break-word;

h6 {
h3 {
color: @grey;
margin: 0;
padding: 0;
Expand All @@ -16,7 +16,7 @@
font-size: @font-size-label-medium;
}

&.link-box--with-header h6 {
&.link-box--with-header h3 {
display: block;
}
}

0 comments on commit 97c252d

Please sign in to comment.