From bcf5448319ff769f13a862ebc1ab09826238fbcb Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 5 Nov 2026 19:29:04 -1000 Subject: Say which index column is sorted --- tests/t0101-index.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/t0101-index.sh b/tests/t0101-index.sh index fcf873b..be947af 100755 --- a/tests/t0101-index.sh +++ b/tests/t0101-index.sh @@ -77,6 +77,19 @@ test_expect_success 'the index sorts by a column on request' ' done ' +# Only the heading of the column the index is sorted by tells a screen reader +# so. Idle lists the latest change first, so it is ascending like the rest. +test_expect_success 'the sorted column heading says which way it runs' ' + for s in name desc owner idle + do + cgit_query "s=$s" >tmp && + grep "" tmp && + test $(grep -o "aria-sort" tmp | wc -l) = 1 || return 1 + done && + cgit_url "" >tmp && + ! grep "aria-sort" tmp +' + # A scan has no cgitrc order for the index to keep, so it lists what it finds # by path whatever order the directory hands back, comparing names the way # case-sensitive-sort tells the index to. -- cgit 2.12.1