From ae78008cd512e65b97a7b47d4d7d50d1d48a7ca8 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Wed, 29 Apr 2020 14:09:01 +1200 Subject: [PATCH] Useragent CSS: Properly count table cells, adjust image labelling. --- useragent.css | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/useragent.css b/useragent.css index 34ad72f..b6d4a9f 100644 --- a/useragent.css +++ b/useragent.css @@ -10,11 +10,17 @@ input[type=submit][value] {speak: always; content: attr(value)} /** Tables **/ table::before {content: "Table"; voice-volume: x-soft} -tr {cue-before: url(about:bulletpoint.wav);} +table {counter-increment: -rhaps-table; counter-reset: -rhaps-tablerow} +tr { + cue-before: url(about:bulletpoint.wav); + counter-increment: -rhaps-tablerow; + counter-reset: -rhaps-tablecol; +} td, th { cue-before: url(about:bulletpoint.wav) -0.1db; - -rhaps-marker: "-rhaps-tablecell" counter(-rhaps-tablerow) "x" counter(-rhaps-tablecol); - counter-increment: -rhaps-tablerow, -rhaps-tablecol; + -rhaps-marker: "-rhaps-tablecell" counter(-rhaps-table) ":" counter(-rhaps-tablerow) "x" counter(-rhaps-tablecol); + counter-increment: -rhaps-tablecol attr(rowspan); /* TODO parse this syntax */ + counter-increment: -rhaps-tablecol; } table caption {voice-volume: soft} @@ -37,7 +43,7 @@ pre, address, samp {speak-as: literal-punctuation} pre, samp, code {voice: neutral 2; white-space: pre;} :link {cue-after: url(about:link.wav) !important; voice-pitch: low} :visited {cue-after: url(about:link.wav) -0.1db !important} -img {voice-volume: soft; content: attr(src)} +img {content: "Image " attr(src)} img[alt] {content: attr(alt)} b, strong {voice-rate: slow} -- 2.30.2