Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
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.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0104-tree.sh | 6 | |
| -rwxr-xr-x | tests/t0107-diff.sh | 6 |
2 files changed, 12 insertions, 0 deletions
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 "<a id=.n2. href=.#n2.>2</a>" 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 "<table class=.blob. role=.presentation.>" 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 "<div class=.add.>+5</div>" 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 "<table class=.diff. role=.presentation.>" 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' ' |
