From d814b04b96a31c97a97a8c780ba3bd1d0c222e13 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 5 Nov 2026 20:07:05 -1000 Subject: Read the file and diff tables as layout The file view's table only sets the line numbers beside the code, and the unified diff's is a single cell holding every file. --- tests/t0104-tree.sh | 6 ++++++ tests/t0107-diff.sh | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/t0104-tree.sh b/tests/t0104-tree.sh index 35b1948..21fc74b 100755 --- a/tests/t0104-tree.sh +++ b/tests/t0104-tree.sh @@ -25,6 +25,12 @@ test_expect_success 'no line 2' ' ! grep "2" tmp ' +# The table only sets the numbers beside the code, so a screen reader is told +# to read it as layout rather than as a table of data. +test_expect_success 'the file table is read as layout' ' + grep "" tmp +' + # The numbers and the code are two columns of text that a browser keeps in # step only while both are set in one font. Only a browser shows the drift, # so this checks the rule that prevents it. diff --git a/tests/t0107-diff.sh b/tests/t0107-diff.sh index d03ecd2..3c1f09c 100755 --- a/tests/t0107-diff.sh +++ b/tests/t0107-diff.sh @@ -22,6 +22,12 @@ test_expect_success 'find added line' ' grep "
+5
" tmp ' +# The unified diff sits in a single cell, which holds the files together +# rather than tabulating them, so a screen reader is told it is layout. +test_expect_success 'the unified diff table is read as layout' ' + grep "
" tmp +' + # A revision that names no commit is quoted the way the request wrote it, as # the commit and patch pages quote it, on either side of the diff. test_expect_success 'a tree on either side is named as the request gave it' ' -- cgit 2.12.1