~alcinnz/rhapsode

ref: 8bf7b85dffbcad8f1659e7d4f495160473b0e991 rhapsode/useragent.css -rw-r--r-- 4.3 KiB
8bf7b85d — Adrian Cochrane Remove global variable, move to Page field. 3 years ago
                                                                                
20d1c98e Adrian Cochrane
943ea735 Adrian Cochrane
38f17984 Adrian Cochrane
d94a3ecb Adrian Cochrane
a8275ac6 Adrian Cochrane
943ea735 Adrian Cochrane
8cfb4861 Adrian Cochrane
943ea735 Adrian Cochrane
5bbbe410 Adrian Cochrane
6e87a147 Adrian Cochrane
86729618 Adrian Cochrane
57a81598 Adrian Cochrane
3a0ff8db Adrian Cochrane
78836e34 Adrian Cochrane
ae78008c Adrian Cochrane
5bbbe410 Adrian Cochrane
c0c584bb Adrian Cochrane
ae78008c Adrian Cochrane
5bbbe410 Adrian Cochrane
943ea735 Adrian Cochrane
5bbbe410 Adrian Cochrane
943ea735 Adrian Cochrane
5bbbe410 Adrian Cochrane
943ea735 Adrian Cochrane
ee018b49 Adrian Cochrane
5bbbe410 Adrian Cochrane
20d1c98e Adrian Cochrane
c0c584bb Adrian Cochrane
ae78008c Adrian Cochrane
6e87a147 Adrian Cochrane
86729618 Adrian Cochrane
57a81598 Adrian Cochrane
3a0ff8db Adrian Cochrane
78836e34 Adrian Cochrane
943ea735 Adrian Cochrane
5bbbe410 Adrian Cochrane
c0c584bb Adrian Cochrane
943ea735 Adrian Cochrane
c0c584bb Adrian Cochrane
943ea735 Adrian Cochrane
c0c584bb Adrian Cochrane
943ea735 Adrian Cochrane
b4780a9c Adrian Cochrane
943ea735 Adrian Cochrane
5bbbe410 Adrian Cochrane
943ea735 Adrian Cochrane
38f17984 Adrian Cochrane
943ea735 Adrian Cochrane
f112607a Adrian Cochrane
943ea735 Adrian Cochrane
6e87a147 Adrian Cochrane
38f17984 Adrian Cochrane
6e87a147 Adrian Cochrane
86729618 Adrian Cochrane
57a81598 Adrian Cochrane
38f17984 Adrian Cochrane
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
link[rel=stylesheet], meta, style, script, title, base {speak: never}
datalist, template {speak: never}
: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 */
:target {-rhaps-marker: "main"}

/** Forms **/
button, select, textarea, input, output {speak: never} /* Leave to special form entry mode */
button[type=submit] {speak: always}
input[type=submit][value] {speak: always; content: attr(value)}

form[title] {content: attr(title)} /* Ideal UX for (inline) <form>s. */
form[alt] {content: attr(alt)}

/** Tables **/
table::before {content: "Table"; voice-volume: x-soft}
table:lang(hu)::before {content: "táblázat"}
table:lang(nl)::before {content: "tabel"}
table:lang(es)::before {content: "tabla"}
table:lang(it)::before {content: "tabella"}
table:lang(sv)::before, table:lang(nb-NO)::before {content: "tabell"}
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-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}

/** Sectioning **/
footer, header {voice-volume: soft}
nav {speak: never} /* Expose the links for navigation, but not narration */
h1, h2, h3, h4, h5, h6, legend, th, summary, dt {voice-stress: strong}
h1, h2, h3, h4, h5, h6, section, aside {-rhaps-marker: -rhaps-section}
h1 {pause: x-strong; voice-rate: x-slow}
h2 {pause: strong; voice-rate: slow}
h3, th, summary, legend, dt {pause: medium; voice-rate: medium}
h4 {pause: weak; voice-rate: fast}
h5, h6 {pause: x-weak; voice-rate: fast}
h6 {voice-pitch: high}

/** Text **/
hr {pause: x-strong}
p, pre, samp, blockquote {pause: strong; -rhaps-marker: -rhaps-paragraph}
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}
link[rel] {content: attr(rel)} link[title] {content: attr(title)} /* [title] overrides [rel] */
:visited {cue-after: url(about:link.wav) -0.1db !important}
img {content: "Image " attr(src)}
img:lang(hu):not([alt]) {content: "kép " attr(src)}
img:lang(nl):not([alt]) {content: "afbeelding " attr(src)}
img:lang(es):not([alt]) {content: "imagen " attr(src)}
img:lang(it):not([alt]) {content: "immagine " attr(src)}
img:lang(sv):not([alt]) {content: "bild " attr(src)}
img:lang(nb-NO):not([alt]) {content: "bilde " attr(src)}
img[alt] {content: attr(alt)}

b, strong {voice-rate: slow}
i, em {voice-stress: strong}
br {pause: medium}
code {speak-as: literal-punctuation}
s, del {voice-volume: x-soft}
u, ins {voice-volume: loud}

/** lists **/
li, dt, dd {
    cue-before: url(about:bulletpoint.wav);
    pause: strong;
    -rhaps-marker: -rhaps-paragraph;
}
li li, dd dt, dd dd {cue-before: url(about:bulletpoint.wav) -0.1db}
li li li, dd dd dt, dd dd dd {cue-before: url(about:bulletpoint.wav) -0.2db}
li li li li, dd dd dd dt, dd dd dd dd {cue-before: url(about:bulletpoint.wav) -0.3db}
li li li li li, dd dd dd dd dt, dd dd dd dd dd {
    cue-before: url(about:bulletpoint.wav) -0.4db
}
li li li li li li, dd dd dd dd dd dt, dd dd dd dd dd dd {
    cue-before: url(about:bulletpoint.wav) -0.5db
}

ol {counter-reset: -rhaps-ol}
ol li::before {
    counter-increment: -rhaps-ol;
    content: counters(-rhaps-ol, " ") " ";
}
ul, ol {-rhaps-marker: -rhaps-section}

/** HTML5 **/
abbr[title]::after {content: attr(title); voice-volume: x-soft}
abbr {speak-as: spell-out}

q, blockquote {voice-family: female 2}
cite {voice-stress: reduce}
dialog:not([open]) {speak: always}
kbd {speak-as: spell-out}
progress {content: -rhaps-percentage(attr(value) attr(max)) "%"}
sub {voice-rate: x-fast}
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
- Spanish */

/** ARIA */
[aria-hidden] {speak: never}