Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* [FEATURE] ...

* [CHANGE] Replace all Cucumber features with Minitest/Spec specs (by [@faisal][])
* [BUGFIX] Add `lang="en"` to the report's `<html>` element, give the menu-toggle anchor an `aria-label`, and make the per-rating summary IDs unique. Fixes 17 WCAG 2.1 AA structural errors on `overview.html`. (by [@MarcusAl][])

# v5.0.0 / 2026-01-26 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.12.0...v5.0.0)

Expand Down Expand Up @@ -504,3 +505,4 @@
[@fbuys]: https://github.com/fbuys
[@exoego]: https://github.com/exoego
[@raff-s]: https://github.com/raff-s
[@MarcusAl]: https://github.com/MarcusAl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand All @@ -16,7 +16,7 @@

<body>
<header class="navbar navbar-default navbar-fixed-top">
<a href="#menu-toggle" class="btn btn-default hidden-lg visible-sm-* hidden-md visible-xs-* pull-left" id="menu-toggle"><i class="fa fa-bars" aria-hidden="true"></i></a>
<a href="#menu-toggle" class="btn btn-default hidden-lg visible-sm-* hidden-md visible-xs-* pull-left" id="menu-toggle" aria-label="Toggle navigation menu"><i class="fa fa-bars" aria-hidden="true"></i></a>
<a href="<%= file_path('overview.html') %>"><img src="<%= asset_path('images/logo.png') %>" alt="Ruby Critic Logo" title="Ruby Critic Logo" width="55"><span class="logo">RUBYCRITIC</span></a>
<% if Config.compare_branches_mode? %>
<ul class="nav navbar-nav navbar-right">
Expand Down
6 changes: 3 additions & 3 deletions lib/rubycritic/generators/html/templates/overview.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
</div>
<div class="pull-right Summary_Content col-xs-9 col-sm-9 col-md-9 col-lg-9">
<ul class="list-inline">
<li><h4 id="ratingAfileCount"><%= @summary[rating][:files] %></h4><span>files</span></li>
<li><h4 id="ratingAfileCount"><%= @summary[rating][:churns] %></h4><span>churns</span></li>
<li><h4 id="ratingAfileCount"><%= @summary[rating][:smells] %></h4><span>smells</span></li>
<li><h4 id="rating-<%= rating.downcase %>-files"><%= @summary[rating][:files] %></h4><span>files</span></li>
<li><h4 id="rating-<%= rating.downcase %>-churns"><%= @summary[rating][:churns] %></h4><span>churns</span></li>
<li><h4 id="rating-<%= rating.downcase %>-smells"><%= @summary[rating][:smells] %></h4><span>smells</span></li>
</ul>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions test/samples/simple_cov_index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand All @@ -16,7 +16,7 @@

<body>
<header class="navbar navbar-default navbar-fixed-top">
<a href="#menu-toggle" class="btn btn-default hidden-lg visible-sm-* hidden-md visible-xs-* pull-left" id="menu-toggle"><i class="fa fa-bars" aria-hidden="true"></i></a>
<a href="#menu-toggle" class="btn btn-default hidden-lg visible-sm-* hidden-md visible-xs-* pull-left" id="menu-toggle" aria-label="Toggle navigation menu"><i class="fa fa-bars" aria-hidden="true"></i></a>
<a href="overview.html"><img src="assets/images/logo.png" alt="Ruby Critic Logo" title="Ruby Critic Logo" width="55"><span class="logo">RUBYCRITIC</span></a>

</header>
Expand Down
Loading