From 38f17984080b556db492dc62578bc7bf111da509 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Sat, 9 May 2020 18:15:42 +1200 Subject: [PATCH] Stylesheet updates for details, taking advantage of pseudoclasses, and attempted counters fix. --- useragent.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/useragent.css b/useragent.css index 6a83593..7f96cee 100644 --- a/useragent.css +++ b/useragent.css @@ -1,6 +1,9 @@ head, link, meta, style, script, title, base {speak: never} datalist, template {speak: never} -html {speak-as: normal no-punctuation} +:root { + speak-as: normal no-punctuation; + counter-reset: -rhaps-table, -rhaps-section, -rhaps-paragraph +} [lang] {-rhaps-lang: attr(lang)} /* Pass this info through styletree into output */ /** Forms **/ @@ -86,7 +89,7 @@ abbr {speak-as: spell-out} q, blockquote {voice-family: female 2} cite {voice-stress: reduce} -dialog {speak: never} dialog[open] {speak: always} +dialog:not([open]) {speak: always} kbd {speak-as: spell-out} progress {content: -rhaps-percentage(attr(value) attr(max)) "%"} sub {voice-rate: x-fast} @@ -94,8 +97,14 @@ sup {voice-rate: fast} var {voice-rate: slow} aside {voice-volume: soft} +details > :not(caption:first-of-type) {speak: never} +details:target > *, details[open] > * {speak: always} + /* Localized into: - English - French (surprisingly same as English) - Hungarian - Dutch */ + +/** ARIA */ +[aria-hidden] {speak: never} -- 2.30.2