Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Let a keyboard scroll the hex dump
Chrome and Firefox already let an overflowing box take focus, with
their own ring, but WebKit does not. The table takes focus on a mouse
click as well, where focus-visible keeps the ring off.
Diffstat (limited to 'source/ui-tree.c')
| -rw-r--r-- | source/ui-tree.c | 4 |
1 file changed, 3 insertions, 1 deletion
diff --git a/source/ui-tree.c b/source/ui-tree.c index eed5f25..b682f3e 100644 --- a/source/ui-tree.c +++ b/source/ui-tree.c @@ -117,7 +117,9 @@ static void print_binary_buffer(char *buf, size_t size, const char *path, const char ascii[HEXDUMP_ROW_BYTES + 1]; struct strbuf row = STRBUF_INIT; - html("<table class='bin-blob'>\n"); + // The table scrolls sideways on a narrow window, and since nothing in + // it can take focus, the table has to for a keyboard to scroll it. + html("<table class='bin-blob' tabindex='0' aria-label='Hex dump'>\n"); html("<tr><th>ofs</th><th>hex dump</th><th>ascii</th></tr>\n"); // A row goes out in one write rather than a write per byte. |
