Hello,

Please find a patch attached, along with a screenshot to illustrate the 
dark mode issue.

Best,
~Nicolas

PS: previously sent from my other email, but it seems to be hit-or-miss 
so let's try from this address instead.
>From 96f5e7951995be8216ecee81968b0f2c7fe0141a Mon Sep 17 00:00:00 2001
From: Nicolas CARPi <nico-git@deltablot.email>
Date: Tue, 20 Aug 2024 10:39:17 +0200
Subject: [PATCH] BUG/MINOR: stats-html: improve markup and fix css in dark
 mode

This patch concerns the HTML stats page:
* Update the Doctype to a modern one
* Add the "lang" attribute to the "html" tag. This is required by WCAG
  Success Criterion 3.1.1 (accessibility standard)
* Fix the text color in dark mode for the Scope input field
---
 src/stats-html.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/stats-html.c b/src/stats-html.c
index e27ff8e40..23cfb91a0 100644
--- a/src/stats-html.c
+++ b/src/stats-html.c
@@ -59,9 +59,8 @@ void stats_dump_html_head(struct appctx *appctx)
 
        /* WARNING! This must fit in the first buffer !!! */
        chunk_appendf(chk,
-                     "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 
Transitional//EN\"\n"
-                     "\"http://www.w3.org/TR/html4/loose.dtd\";>\n"
-                     "<html><head><title>Statistics Report for " PRODUCT_NAME 
"%s%s</title>\n"
+                     "<!DOCTYPE html>\n"
+                     "<html lang=\"en\"><head><title>Statistics Report for " 
PRODUCT_NAME "%s%s</title>\n"
                      "<link rel=\"icon\" href=\"data:,\">\n"
                      "<meta http-equiv=\"content-type\" content=\"text/html; 
charset=iso-8859-1\">\n"
                      "<style type=\"text/css\"><!--\n"
@@ -169,7 +168,7 @@ void stats_dump_html_head(struct appctx *appctx)
                      " h2 { color: #a265e0; }\n"
                      " h3 { color: #ff5190; background-color: #3e3e1f; }\n"
                      " a { color: #3391ff; }\n"
-                     " input { background-color: #2f3437; }\n"
+                     " input { background-color: #2f3437; color: #e8e6e3; }\n"
                      " .hr { border-color: #8c8273; }\n"
                      " .titre { background-color: #1aa6a6; color: #e8e6e3; }\n"
                      " .frontend {background: #2f3437;}\n"
-- 
2.46.0

Reply via email to