Skip to content

Commit

Permalink
Improve semantic markup of breadcrumbs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Dec 6, 2024
1 parent 643f3fd commit e415ffd
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions app/components/spotlight/breadcrumbs_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
<div class="container breadcrumbs-container" role="navigation" aria-label="<%= t('spotlight.breadcrumb.label') %>">
<div class="row">
<div class="col-md-12">
<nav>
<ul class="breadcrumb list-unstyled d-flex">
<% breadcrumbs.each do |crumb| %>
<li class="breadcrumb-item <%= crumb == breadcrumbs.last ? 'active' : '' %>">
<% if crumb.link? && crumb != breadcrumbs.last %>
<%= link_to crumb.name, path(crumb.path) %>
<% else %>
<%= crumb.name %>
<% end %>
</li>
<% end %>
</ul>
</nav>
</div>
</div>
</div>
<nav class="container breadcrumbs-container" aria-label="<%= t('spotlight.breadcrumb.label') %>">
<ol class="breadcrumb list-unstyled d-flex">
<% breadcrumbs.each do |crumb| %>
<li class="breadcrumb-item <%= crumb == breadcrumbs.last ? 'active' : '' %>">
<% if crumb.link? && crumb != breadcrumbs.last %>
<%= link_to crumb.name, path(crumb.path) %>
<% else %>
<%= crumb.name %>
<% end %>
</li>
<% end %>
</ol>
</nav>

0 comments on commit e415ffd

Please sign in to comment.