From 46ab72c3e988ea31451b6397ba9a9b3f2819859f Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 29 Oct 2026 13:31:06 -1000 Subject: Name the graph and links header cells Both were empty, so a screen reader moving through the table announced those columns with no name. An aria-label names them without adding text to the page. --- source/ui-log.c | 2 +- source/ui-tree.c | 2 +- tests/t0103-log.sh | 3 ++- tests/t0104-tree.sh | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/ui-log.c b/source/ui-log.c index a01ef4e..870ff06 100644 --- a/source/ui-log.c +++ b/source/ui-log.c @@ -585,7 +585,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern html("\n"); if (commit_graph) - html(""); + html(""); else html("Age"); html("Commit message"); diff --git a/source/ui-tree.c b/source/ui-tree.c index 1d8bb3d..69c0763 100644 --- a/source/ui-tree.c +++ b/source/ui-tree.c @@ -425,7 +425,7 @@ static void ls_head(void) html("Mode"); html("Name"); html("Size"); - html(""); + html(""); html("\n"); } diff --git a/tests/t0103-log.sh b/tests/t0103-log.sh index 573baa8..d7e745d 100755 --- a/tests/t0103-log.sh +++ b/tests/t0103-log.sh @@ -107,7 +107,8 @@ test_expect_success 'the log draws the commit graph when enabled' ' sed "s/^cache-size=.*/cache-size=0/" cgitrc } >graphrc && CGIT_CONFIG="$PWD/graphrc" QUERY_STRING="url=foo/log/" cgit >tmp && - grep "class=.commitgraph." tmp + grep "class=.commitgraph." tmp && + grep "" tmp ' # The search is literal, so text that is no valid regular expression still diff --git a/tests/t0104-tree.sh b/tests/t0104-tree.sh index d464f8c..41134a4 100755 --- a/tests/t0104-tree.sh +++ b/tests/t0104-tree.sh @@ -11,6 +11,9 @@ test_description='Check content on tree page' test_expect_success 'generate bar/tree' 'cgit_url "bar/tree" >tmp' test_expect_success 'find file-1' 'grep "file-1" tmp' test_expect_success 'find file-50' 'grep "file-50" tmp' +test_expect_success 'the links column has a name' ' + grep "" tmp +' test_expect_success 'generate bar/tree/file-50' 'cgit_url "bar/tree/file-50" >tmp' -- cgit