Skip to content

Commit

Permalink
Merge pull request #22807 from GilbertCherrie/fix_dashboard_accessibi…
Browse files Browse the repository at this point in the history
…lity_issues

Fix dashboard accessibility issues
  • Loading branch information
Fryguy authored Dec 14, 2023
2 parents 3baa1f3 + 4ef95cc commit 999306b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/miq_widget/report_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ def generate(user_or_group)
end
end

empty_row = "<tr><td>#{_("No records found")}</td>#{"<td></td>" * (headers.length - 1)}</tr>"

rows = "<table class='table table-striped table-bordered table-hover'><thead><tr>"
headers.each { |h| rows << "<th>#{h}</th>" }
rows << "</tr></thead><tbody>"
rows << (body.blank? ? "<tr><td colspan='5'>" + _("No records found") + "</td></tr>" : body)
rows << (body.presence || empty_row)
rows << "</tbody></table>"
end
end

0 comments on commit 999306b

Please sign in to comment.