From 4ef95cce61afce312bdb28dc4150804230c72fc3 Mon Sep 17 00:00:00 2001 From: Gilbert Cherrie Date: Thu, 14 Dec 2023 11:36:39 -0500 Subject: [PATCH] Fix dashboard accessibility issues --- app/models/miq_widget/report_content.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/miq_widget/report_content.rb b/app/models/miq_widget/report_content.rb index 0a68ca36415..031468663d7 100644 --- a/app/models/miq_widget/report_content.rb +++ b/app/models/miq_widget/report_content.rb @@ -28,10 +28,12 @@ def generate(user_or_group) end end + empty_row = "#{_("No records found")}#{"" * (headers.length - 1)}" + rows = "" headers.each { |h| rows << "" } rows << "" - rows << (body.blank? ? "" : body) + rows << (body.presence || empty_row) rows << "
#{h}
" + _("No records found") + "
" end end