@readium/guided-navigation 1.2.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/README.md +4 -1
  2. package/dist/converter.js +1 -1
  3. package/dist/elementHandlers.js +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/object.js +1 -1
  6. package/dist/roles.js +1 -1
  7. package/fixtures/ROLES_COVERAGE.md +13 -11
  8. package/fixtures/abbreviation-nested-term-punctuation/gnd.json +6 -6
  9. package/fixtures/abbreviation-nested-term-punctuation/input.html +1 -1
  10. package/fixtures/abbreviation-nested-term-punctuation/meta.json +1 -1
  11. package/fixtures/abbreviation-period-mid-sentence/gnd.json +9 -0
  12. package/fixtures/abbreviation-period-mid-sentence/input.html +1 -0
  13. package/fixtures/abbreviation-period-mid-sentence/meta.json +11 -0
  14. package/fixtures/abbreviation-period-sentence-end/gnd.json +9 -0
  15. package/fixtures/abbreviation-period-sentence-end/input.html +1 -0
  16. package/fixtures/abbreviation-period-sentence-end/meta.json +11 -0
  17. package/fixtures/accessible-name-labelledby-aria-hidden/gnd.json +1 -1
  18. package/fixtures/accessible-name-labelledby-hidden-attribute/gnd.json +1 -1
  19. package/fixtures/biblioref-target-descendant-ids/gnd.json +3 -3
  20. package/fixtures/biblioref-target-in-bibliography-role-aria/gnd.json +1 -1
  21. package/fixtures/biblioref-target-mixed-content/gnd.json +3 -3
  22. package/fixtures/description-roleless-lone-child/gnd.json +24 -0
  23. package/fixtures/description-roleless-lone-child/input.html +1 -0
  24. package/fixtures/description-roleless-lone-child/meta.json +11 -0
  25. package/fixtures/description-roleless-wrapper/gnd.json +25 -0
  26. package/fixtures/description-roleless-wrapper/input.html +1 -0
  27. package/fixtures/description-roleless-wrapper/meta.json +10 -0
  28. package/fixtures/glossary-role-aria/gnd.json +23 -31
  29. package/fixtures/glossref-role-aria-mid-sentence/gnd.json +1 -1
  30. package/fixtures/glossref-sole-content/gnd.json +12 -20
  31. package/fixtures/glossref-target-in-glossary-role-aria/gnd.json +13 -21
  32. package/fixtures/glossref-target-percent-encoded/gnd.json +1 -1
  33. package/fixtures/language-alt-inherited/gnd.json +25 -0
  34. package/fixtures/language-alt-inherited/input.html +1 -0
  35. package/fixtures/language-alt-inherited/meta.json +11 -0
  36. package/fixtures/language-alt-own-lang/gnd.json +25 -0
  37. package/fixtures/language-alt-own-lang/input.html +1 -0
  38. package/fixtures/language-alt-own-lang/meta.json +11 -0
  39. package/fixtures/language-block-empty-lang/gnd.json +8 -0
  40. package/fixtures/language-block-empty-lang/input.html +1 -0
  41. package/fixtures/language-block-empty-lang/meta.json +10 -0
  42. package/fixtures/language-describedby-shared/gnd.json +49 -0
  43. package/fixtures/language-describedby-shared/input.html +1 -0
  44. package/fixtures/language-describedby-shared/meta.json +12 -0
  45. package/fixtures/language-empty-lang-stops-inheritance/gnd.json +24 -0
  46. package/fixtures/language-empty-lang-stops-inheritance/input.html +1 -0
  47. package/fixtures/language-empty-lang-stops-inheritance/meta.json +11 -0
  48. package/fixtures/language-figcaption/gnd.json +25 -0
  49. package/fixtures/language-figcaption/input.html +1 -0
  50. package/fixtures/language-figcaption/meta.json +11 -0
  51. package/fixtures/language-figcaption-credit/gnd.json +41 -0
  52. package/fixtures/language-figcaption-credit/input.html +1 -0
  53. package/fixtures/language-figcaption-credit/meta.json +12 -0
  54. package/fixtures/language-figcaption-switches/gnd.json +24 -0
  55. package/fixtures/language-figcaption-switches/input.html +1 -0
  56. package/fixtures/language-figcaption-switches/meta.json +11 -0
  57. package/fixtures/language-figcaption-switches-throughout/gnd.json +25 -0
  58. package/fixtures/language-figcaption-switches-throughout/input.html +1 -0
  59. package/fixtures/language-figcaption-switches-throughout/meta.json +11 -0
  60. package/fixtures/language-inline-case-insensitive/gnd.json +9 -0
  61. package/fixtures/language-inline-case-insensitive/input.html +1 -0
  62. package/fixtures/language-inline-case-insensitive/meta.json +10 -0
  63. package/fixtures/language-inline-case-insensitive-ssml/gnd.json +9 -0
  64. package/fixtures/language-inline-case-insensitive-ssml/input.html +1 -0
  65. package/fixtures/language-inline-case-insensitive-ssml/meta.json +10 -0
  66. package/fixtures/language-inline-empty-lang/gnd.json +9 -0
  67. package/fixtures/language-inline-empty-lang/input.html +1 -0
  68. package/fixtures/language-inline-empty-lang/meta.json +10 -0
  69. package/fixtures/language-inline-empty-lang-formatted/gnd.json +8 -0
  70. package/fixtures/language-inline-empty-lang-formatted/input.html +1 -0
  71. package/fixtures/language-inline-empty-lang-formatted/meta.json +10 -0
  72. package/fixtures/language-inline-empty-lang-only/gnd.json +8 -0
  73. package/fixtures/language-inline-empty-lang-only/input.html +1 -0
  74. package/fixtures/language-inline-empty-lang-only/meta.json +10 -0
  75. package/fixtures/language-inline-empty-lang-undeclared/gnd.json +9 -0
  76. package/fixtures/language-inline-empty-lang-undeclared/input.html +1 -0
  77. package/fixtures/language-inline-empty-lang-undeclared/meta.json +10 -0
  78. package/fixtures/language-labelledby-target/gnd.json +26 -0
  79. package/fixtures/language-labelledby-target/input.html +1 -0
  80. package/fixtures/language-labelledby-target/meta.json +11 -0
  81. package/fixtures/language-labelledby-target-aria-label/gnd.json +32 -0
  82. package/fixtures/language-labelledby-target-aria-label/input.html +1 -0
  83. package/fixtures/language-labelledby-target-aria-label/meta.json +11 -0
  84. package/fixtures/language-labelledby-target-switches/gnd.json +25 -0
  85. package/fixtures/language-labelledby-target-switches/input.html +1 -0
  86. package/fixtures/language-labelledby-target-switches/meta.json +11 -0
  87. package/fixtures/language-labelledby-targets-case/gnd.json +36 -0
  88. package/fixtures/language-labelledby-targets-case/input.html +1 -0
  89. package/fixtures/language-labelledby-targets-case/meta.json +11 -0
  90. package/fixtures/language-labelledby-targets-differ/gnd.json +35 -0
  91. package/fixtures/language-labelledby-targets-differ/input.html +1 -0
  92. package/fixtures/language-labelledby-targets-differ/meta.json +11 -0
  93. package/fixtures/language-link-switches/gnd.json +20 -0
  94. package/fixtures/language-link-switches/input.html +1 -0
  95. package/fixtures/language-link-switches/meta.json +11 -0
  96. package/fixtures/language-pagebreak-label/gnd.json +22 -0
  97. package/fixtures/language-pagebreak-label/input.html +1 -0
  98. package/fixtures/language-pagebreak-label/meta.json +11 -0
  99. package/fixtures/language-undeclared-description/gnd.json +23 -0
  100. package/fixtures/language-undeclared-description/input.html +1 -0
  101. package/fixtures/language-undeclared-description/meta.json +11 -0
  102. package/fixtures/language-xml-lang-empty-html-inherits/gnd.json +25 -0
  103. package/fixtures/language-xml-lang-empty-html-inherits/input.html +1 -0
  104. package/fixtures/language-xml-lang-empty-html-inherits/meta.json +11 -0
  105. package/fixtures/language-xml-lang-empty-html-lang-applies/gnd.json +25 -0
  106. package/fixtures/language-xml-lang-empty-html-lang-applies/input.html +1 -0
  107. package/fixtures/language-xml-lang-empty-html-lang-applies/meta.json +11 -0
  108. package/fixtures/language-xml-lang-empty-xhtml/gnd.json +24 -0
  109. package/fixtures/language-xml-lang-empty-xhtml/input.xhtml +2 -0
  110. package/fixtures/language-xml-lang-empty-xhtml/meta.json +11 -0
  111. package/fixtures/language-xml-lang-over-lang/gnd.json +25 -0
  112. package/fixtures/language-xml-lang-over-lang/input.html +1 -0
  113. package/fixtures/language-xml-lang-over-lang/meta.json +11 -0
  114. package/fixtures/link-containing-image/gnd.json +35 -0
  115. package/fixtures/link-containing-image/input.html +1 -0
  116. package/fixtures/link-containing-image/meta.json +12 -0
  117. package/fixtures/link-containing-pagebreak/gnd.json +33 -0
  118. package/fixtures/link-containing-pagebreak/input.html +1 -0
  119. package/fixtures/link-containing-pagebreak/meta.json +12 -0
  120. package/fixtures/link-content-conversion/gnd.json +31 -0
  121. package/fixtures/link-content-conversion/input.html +1 -0
  122. package/fixtures/link-content-conversion/meta.json +12 -0
  123. package/fixtures/link-content-identity/gnd.json +21 -0
  124. package/fixtures/link-content-identity/input.html +1 -0
  125. package/fixtures/link-content-identity/meta.json +10 -0
  126. package/fixtures/link-content-words/gnd.json +46 -0
  127. package/fixtures/link-content-words/input.html +1 -0
  128. package/fixtures/link-content-words/meta.json +10 -0
  129. package/fixtures/manifest.json +431 -1
  130. package/fixtures/math-inline/gnd.json +22 -0
  131. package/fixtures/math-inline/input.html +1 -0
  132. package/fixtures/math-inline/meta.json +11 -0
  133. package/fixtures/nested-blockquote/gnd.json +22 -0
  134. package/fixtures/nested-blockquote/input.html +5 -0
  135. package/fixtures/nested-blockquote/meta.json +11 -0
  136. package/fixtures/nested-section/gnd.json +22 -0
  137. package/fixtures/nested-section/input.html +5 -0
  138. package/fixtures/nested-section/meta.json +11 -0
  139. package/fixtures/redundant-role-body-chapter/gnd.json +23 -0
  140. package/fixtures/redundant-role-body-chapter/input.xhtml +10 -0
  141. package/fixtures/redundant-role-body-chapter/meta.json +13 -0
  142. package/fixtures/redundant-role-nested-chapter/gnd.json +30 -0
  143. package/fixtures/redundant-role-nested-chapter/input.xhtml +12 -0
  144. package/fixtures/redundant-role-nested-chapter/meta.json +13 -0
  145. package/fixtures/table-cell-link/gnd.json +48 -0
  146. package/fixtures/table-cell-link/input.html +1 -0
  147. package/fixtures/table-cell-link/meta.json +14 -0
  148. package/fixtures/term-span-in-dt/gnd.json +24 -0
  149. package/fixtures/term-span-in-dt/input.html +4 -0
  150. package/fixtures/term-span-in-dt/meta.json +12 -0
  151. package/package.json +1 -1
  152. package/src/converter.ts +72 -15
  153. package/src/elementHandlers.ts +31 -11
  154. package/src/emptyPairs.ts +2 -1
  155. package/src/index.ts +1 -0
  156. package/src/object.ts +7 -10
  157. package/src/roles.ts +49 -0
  158. package/types/src/converter.d.ts +21 -2
  159. package/types/src/emptyPairs.d.ts +2 -0
  160. package/types/src/index.d.ts +1 -0
  161. package/types/src/object.d.ts +1 -0
  162. package/types/src/roles.d.ts +1 -0
@@ -0,0 +1,31 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "link1",
5
+ "text": {
6
+ "ssml": "<emphasis>coastal</emphasis> map",
7
+ "language": "en"
8
+ },
9
+ "textref": "map.xhtml"
10
+ },
11
+ {
12
+ "id": "glossref1",
13
+ "role": [
14
+ "glossref"
15
+ ],
16
+ "text": {
17
+ "ssml": "<emphasis>lantern</emphasis> room",
18
+ "language": "en"
19
+ },
20
+ "textref": "glossary.xhtml#lantern-room"
21
+ }
22
+ ],
23
+ "role": [
24
+ "paragraph"
25
+ ],
26
+ "text": {
27
+ "plain": "See the coastal map and the lantern room.",
28
+ "ssml": "See the <readium:link id=\"link1\" /> and the <readium:glossref id=\"glossref1\" />.",
29
+ "language": "en"
30
+ }
31
+ }
@@ -0,0 +1 @@
1
+ <p>See the <a href="map.xhtml"><em>coastal</em> map</a> and the <a href="glossary.xhtml#lantern-room" role="doc-glossref"><em>lantern</em> room</a>.</p>
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "link-content-conversion",
3
+ "description": "Every kind of link converts its content the same way, like any other text",
4
+ "role": "link",
5
+ "rolesCovered": [
6
+ "paragraph",
7
+ "link",
8
+ "glossref"
9
+ ],
10
+ "sourceRef": "https://github.com/readium/guided-navigation/tree/main/examples/read-aloud",
11
+ "inputKind": "fragment"
12
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "link1",
5
+ "children": [
6
+ {
7
+ "id": "ch2-teaser",
8
+ "text": {
9
+ "plain": "The storm arrives."
10
+ }
11
+ }
12
+ ],
13
+ "textref": "chapter2.xhtml"
14
+ }
15
+ ],
16
+ "text": {
17
+ "plain": "Next: The storm arrives.",
18
+ "ssml": "Next: <readium:link id=\"link1\" />",
19
+ "language": "en"
20
+ }
21
+ }
@@ -0,0 +1 @@
1
+ <div>Next: <a href="chapter2.xhtml"><div id="ch2-teaser">The storm arrives.</div></a></div>
@@ -0,0 +1,10 @@
1
+ {
2
+ "id": "link-content-identity",
3
+ "description": "A link takes on its content only when that content has no identity of its own: a lone result with an id, description or ref stays its child",
4
+ "role": "link",
5
+ "rolesCovered": [
6
+ "link"
7
+ ],
8
+ "sourceRef": "https://github.com/readium/guided-navigation/tree/main/examples/read-aloud",
9
+ "inputKind": "fragment"
10
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "link1",
5
+ "children": [
6
+ {
7
+ "text": {
8
+ "plain": "Chapter 3"
9
+ }
10
+ },
11
+ {
12
+ "role": [
13
+ "term"
14
+ ],
15
+ "text": {
16
+ "plain": "Lenses"
17
+ }
18
+ },
19
+ {
20
+ "text": {
21
+ "plain": ","
22
+ }
23
+ },
24
+ {
25
+ "role": [
26
+ "term"
27
+ ],
28
+ "text": {
29
+ "plain": "mirrors"
30
+ }
31
+ },
32
+ {
33
+ "text": {
34
+ "plain": "and prisms"
35
+ }
36
+ }
37
+ ],
38
+ "textref": "chapter3.xhtml"
39
+ }
40
+ ],
41
+ "text": {
42
+ "plain": "Next: Chapter 3 Lenses, mirrors and prisms",
43
+ "ssml": "Next: <readium:link id=\"link1\" />",
44
+ "language": "en"
45
+ }
46
+ }
@@ -0,0 +1 @@
1
+ <div>Next: <a href="chapter3.xhtml"><div>Chapter 3</div><div><dfn>Lenses</dfn>, <dfn>mirrors</dfn> and prisms</div></a></div>
@@ -0,0 +1,10 @@
1
+ {
2
+ "id": "link-content-words",
3
+ "description": "A link's words in its sentence come from all of its content, spaced only where the source has whitespace or a block boundary",
4
+ "role": "link",
5
+ "rolesCovered": [
6
+ "link"
7
+ ],
8
+ "sourceRef": "https://github.com/readium/guided-navigation/tree/main/examples/read-aloud",
9
+ "inputKind": "fragment"
10
+ }
@@ -93,7 +93,7 @@
93
93
  "id": "abbreviation-nested-term-punctuation",
94
94
  "dir": "abbreviation-nested-term-punctuation",
95
95
  "role": "abbreviation",
96
- "description": "An abbr wrapping a term and punctuation outside it still expands that term's text",
96
+ "description": "An abbr wrapping a term and its period expands them together: the period is part of the term's expansion",
97
97
  "files": {
98
98
  "input": "input.html",
99
99
  "gnd": "gnd.json"
@@ -109,6 +109,26 @@
109
109
  "gnd": "gnd.json"
110
110
  }
111
111
  },
112
+ {
113
+ "id": "abbreviation-period-mid-sentence",
114
+ "dir": "abbreviation-period-mid-sentence",
115
+ "role": "abbreviation",
116
+ "description": "An abbreviation's final period doesn't end the sentence",
117
+ "files": {
118
+ "input": "input.html",
119
+ "gnd": "gnd.json"
120
+ }
121
+ },
122
+ {
123
+ "id": "abbreviation-period-sentence-end",
124
+ "dir": "abbreviation-period-sentence-end",
125
+ "role": "abbreviation",
126
+ "description": "An abbreviation's own final period also ends the sentence; its expansion is the sub's alias",
127
+ "files": {
128
+ "input": "input.html",
129
+ "gnd": "gnd.json"
130
+ }
131
+ },
112
132
  {
113
133
  "id": "abbreviation-spanning-terms",
114
134
  "dir": "abbreviation-spanning-terms",
@@ -599,6 +619,26 @@
599
619
  "gnd": "gnd.json"
600
620
  }
601
621
  },
622
+ {
623
+ "id": "description-roleless-lone-child",
624
+ "dir": "description-roleless-lone-child",
625
+ "role": "description",
626
+ "description": "A lone roleless child with a description is not hoisted into its parent",
627
+ "files": {
628
+ "input": "input.html",
629
+ "gnd": "gnd.json"
630
+ }
631
+ },
632
+ {
633
+ "id": "description-roleless-wrapper",
634
+ "dir": "description-roleless-wrapper",
635
+ "role": "description",
636
+ "description": "A roleless wrapper with a description is kept as an object, not spliced into its parent",
637
+ "files": {
638
+ "input": "input.html",
639
+ "gnd": "gnd.json"
640
+ }
641
+ },
602
642
  {
603
643
  "id": "details-html-native",
604
644
  "dir": "details-html-native",
@@ -1129,6 +1169,26 @@
1129
1169
  "gnd": "gnd.json"
1130
1170
  }
1131
1171
  },
1172
+ {
1173
+ "id": "language-alt-inherited",
1174
+ "dir": "language-alt-inherited",
1175
+ "role": "image",
1176
+ "description": "An image's alt is in the language inherited by its element",
1177
+ "files": {
1178
+ "input": "input.html",
1179
+ "gnd": "gnd.json"
1180
+ }
1181
+ },
1182
+ {
1183
+ "id": "language-alt-own-lang",
1184
+ "dir": "language-alt-own-lang",
1185
+ "role": "image",
1186
+ "description": "An image's alt is in the language its own element declares",
1187
+ "files": {
1188
+ "input": "input.html",
1189
+ "gnd": "gnd.json"
1190
+ }
1191
+ },
1132
1192
  {
1133
1193
  "id": "language-block",
1134
1194
  "dir": "language-block",
@@ -1139,6 +1199,26 @@
1139
1199
  "gnd": "gnd.json"
1140
1200
  }
1141
1201
  },
1202
+ {
1203
+ "id": "language-block-empty-lang",
1204
+ "dir": "language-block-empty-lang",
1205
+ "role": "language",
1206
+ "description": "A block in an empty lang declaration isn't defaulted to English, while its inline shifts are kept in SSML",
1207
+ "files": {
1208
+ "input": "input.html",
1209
+ "gnd": "gnd.json"
1210
+ }
1211
+ },
1212
+ {
1213
+ "id": "language-describedby-shared",
1214
+ "dir": "language-describedby-shared",
1215
+ "role": "figure",
1216
+ "description": "An aria-describedby description is in its targets' shared language",
1217
+ "files": {
1218
+ "input": "input.html",
1219
+ "gnd": "gnd.json"
1220
+ }
1221
+ },
1142
1222
  {
1143
1223
  "id": "language-document",
1144
1224
  "dir": "language-document",
@@ -1149,6 +1229,116 @@
1149
1229
  "gnd": "gnd.json"
1150
1230
  }
1151
1231
  },
1232
+ {
1233
+ "id": "language-empty-lang-stops-inheritance",
1234
+ "dir": "language-empty-lang-stops-inheritance",
1235
+ "role": "language",
1236
+ "description": "An empty lang declaration stops inheritance, leaving an image's alt with no language",
1237
+ "files": {
1238
+ "input": "input.html",
1239
+ "gnd": "gnd.json"
1240
+ }
1241
+ },
1242
+ {
1243
+ "id": "language-figcaption",
1244
+ "dir": "language-figcaption",
1245
+ "role": "figure",
1246
+ "description": "A figure's implicit caption description is in the caption's language",
1247
+ "files": {
1248
+ "input": "input.html",
1249
+ "gnd": "gnd.json"
1250
+ }
1251
+ },
1252
+ {
1253
+ "id": "language-figcaption-credit",
1254
+ "dir": "language-figcaption-credit",
1255
+ "role": "figure",
1256
+ "description": "A figure's caption description language ignores a credit spoken separately",
1257
+ "files": {
1258
+ "input": "input.html",
1259
+ "gnd": "gnd.json"
1260
+ }
1261
+ },
1262
+ {
1263
+ "id": "language-figcaption-switches",
1264
+ "dir": "language-figcaption-switches",
1265
+ "role": "figure",
1266
+ "description": "A figure's caption description has no language when its text switches language",
1267
+ "files": {
1268
+ "input": "input.html",
1269
+ "gnd": "gnd.json"
1270
+ }
1271
+ },
1272
+ {
1273
+ "id": "language-figcaption-switches-throughout",
1274
+ "dir": "language-figcaption-switches-throughout",
1275
+ "role": "figure",
1276
+ "description": "A figure's caption description is in the language its text switches to throughout",
1277
+ "files": {
1278
+ "input": "input.html",
1279
+ "gnd": "gnd.json"
1280
+ }
1281
+ },
1282
+ {
1283
+ "id": "language-inline-case-insensitive",
1284
+ "dir": "language-inline-case-insensitive",
1285
+ "role": "language",
1286
+ "description": "Inline language declarations differing only in case from the block's are the same language: no SSML shift",
1287
+ "files": {
1288
+ "input": "input.html",
1289
+ "gnd": "gnd.json"
1290
+ }
1291
+ },
1292
+ {
1293
+ "id": "language-inline-case-insensitive-ssml",
1294
+ "dir": "language-inline-case-insensitive-ssml",
1295
+ "role": "language",
1296
+ "description": "Inline language declarations differing only in case are not tagged as shifts in SSML produced for other reasons",
1297
+ "files": {
1298
+ "input": "input.html",
1299
+ "gnd": "gnd.json"
1300
+ }
1301
+ },
1302
+ {
1303
+ "id": "language-inline-empty-lang",
1304
+ "dir": "language-inline-empty-lang",
1305
+ "role": "language",
1306
+ "description": "An empty lang declaration inside a known language is an explicit language shift in SSML",
1307
+ "files": {
1308
+ "input": "input.html",
1309
+ "gnd": "gnd.json"
1310
+ }
1311
+ },
1312
+ {
1313
+ "id": "language-inline-empty-lang-formatted",
1314
+ "dir": "language-inline-empty-lang-formatted",
1315
+ "role": "language",
1316
+ "description": "Formatted text only in an empty lang declaration has no language",
1317
+ "files": {
1318
+ "input": "input.html",
1319
+ "gnd": "gnd.json"
1320
+ }
1321
+ },
1322
+ {
1323
+ "id": "language-inline-empty-lang-only",
1324
+ "dir": "language-inline-empty-lang-only",
1325
+ "role": "language",
1326
+ "description": "Text only in an empty lang declaration has no language",
1327
+ "files": {
1328
+ "input": "input.html",
1329
+ "gnd": "gnd.json"
1330
+ }
1331
+ },
1332
+ {
1333
+ "id": "language-inline-empty-lang-undeclared",
1334
+ "dir": "language-inline-empty-lang-undeclared",
1335
+ "role": "language",
1336
+ "description": "An empty lang declaration is a language shift in SSML even when no language is declared around it",
1337
+ "files": {
1338
+ "input": "input.html",
1339
+ "gnd": "gnd.json"
1340
+ }
1341
+ },
1152
1342
  {
1153
1343
  "id": "language-inline-lang-attribute",
1154
1344
  "dir": "language-inline-lang-attribute",
@@ -1189,6 +1379,176 @@
1189
1379
  "gnd": "gnd.json"
1190
1380
  }
1191
1381
  },
1382
+ {
1383
+ "id": "language-labelledby-target",
1384
+ "dir": "language-labelledby-target",
1385
+ "role": "image",
1386
+ "description": "An aria-labelledby description is in its target's language",
1387
+ "files": {
1388
+ "input": "input.html",
1389
+ "gnd": "gnd.json"
1390
+ }
1391
+ },
1392
+ {
1393
+ "id": "language-labelledby-target-aria-label",
1394
+ "dir": "language-labelledby-target-aria-label",
1395
+ "role": "image",
1396
+ "description": "An aria-labelledby target's own aria-label is in that target's language",
1397
+ "files": {
1398
+ "input": "input.html",
1399
+ "gnd": "gnd.json"
1400
+ }
1401
+ },
1402
+ {
1403
+ "id": "language-labelledby-target-switches",
1404
+ "dir": "language-labelledby-target-switches",
1405
+ "role": "image",
1406
+ "description": "An aria-labelledby description has no language when its text switches language inside a target",
1407
+ "files": {
1408
+ "input": "input.html",
1409
+ "gnd": "gnd.json"
1410
+ }
1411
+ },
1412
+ {
1413
+ "id": "language-labelledby-targets-case",
1414
+ "dir": "language-labelledby-targets-case",
1415
+ "role": "image",
1416
+ "description": "An aria-labelledby description is in its targets' language when their declarations differ only in case",
1417
+ "files": {
1418
+ "input": "input.html",
1419
+ "gnd": "gnd.json"
1420
+ }
1421
+ },
1422
+ {
1423
+ "id": "language-labelledby-targets-differ",
1424
+ "dir": "language-labelledby-targets-differ",
1425
+ "role": "image",
1426
+ "description": "An aria-labelledby description has no language when its targets' languages differ",
1427
+ "files": {
1428
+ "input": "input.html",
1429
+ "gnd": "gnd.json"
1430
+ }
1431
+ },
1432
+ {
1433
+ "id": "language-link-switches",
1434
+ "dir": "language-link-switches",
1435
+ "role": "link",
1436
+ "description": "A language switch inside a link stays in the link's own SSML",
1437
+ "files": {
1438
+ "input": "input.html",
1439
+ "gnd": "gnd.json"
1440
+ }
1441
+ },
1442
+ {
1443
+ "id": "language-pagebreak-label",
1444
+ "dir": "language-pagebreak-label",
1445
+ "role": "pagebreak",
1446
+ "description": "A pagebreak's label is in its element's language",
1447
+ "files": {
1448
+ "input": "input.html",
1449
+ "gnd": "gnd.json"
1450
+ }
1451
+ },
1452
+ {
1453
+ "id": "language-undeclared-description",
1454
+ "dir": "language-undeclared-description",
1455
+ "role": "image",
1456
+ "description": "An image's alt has no language when none is declared",
1457
+ "files": {
1458
+ "input": "input.html",
1459
+ "gnd": "gnd.json"
1460
+ }
1461
+ },
1462
+ {
1463
+ "id": "language-xml-lang-empty-html-inherits",
1464
+ "dir": "language-xml-lang-empty-html-inherits",
1465
+ "role": "language",
1466
+ "description": "An empty xml:lang has no effect in HTML, so the inherited language applies",
1467
+ "files": {
1468
+ "input": "input.html",
1469
+ "gnd": "gnd.json"
1470
+ }
1471
+ },
1472
+ {
1473
+ "id": "language-xml-lang-empty-html-lang-applies",
1474
+ "dir": "language-xml-lang-empty-html-lang-applies",
1475
+ "role": "language",
1476
+ "description": "An empty xml:lang has no effect in HTML, so lang on the same element applies",
1477
+ "files": {
1478
+ "input": "input.html",
1479
+ "gnd": "gnd.json"
1480
+ }
1481
+ },
1482
+ {
1483
+ "id": "language-xml-lang-empty-xhtml",
1484
+ "dir": "language-xml-lang-empty-xhtml",
1485
+ "role": "language",
1486
+ "description": "An empty xml:lang in XHTML makes the language unknown, over lang on the same element",
1487
+ "files": {
1488
+ "input": "input.xhtml",
1489
+ "gnd": "gnd.json"
1490
+ }
1491
+ },
1492
+ {
1493
+ "id": "language-xml-lang-over-lang",
1494
+ "dir": "language-xml-lang-over-lang",
1495
+ "role": "language",
1496
+ "description": "xml:lang wins over lang on the same element",
1497
+ "files": {
1498
+ "input": "input.html",
1499
+ "gnd": "gnd.json"
1500
+ }
1501
+ },
1502
+ {
1503
+ "id": "link-containing-image",
1504
+ "dir": "link-containing-image",
1505
+ "role": "link",
1506
+ "description": "An image inside a link is the link's own child, placed in the link's SSML",
1507
+ "files": {
1508
+ "input": "input.html",
1509
+ "gnd": "gnd.json"
1510
+ }
1511
+ },
1512
+ {
1513
+ "id": "link-containing-pagebreak",
1514
+ "dir": "link-containing-pagebreak",
1515
+ "role": "link",
1516
+ "description": "A pagebreak inside a link is the link's own child, its page number kept out of the link's text",
1517
+ "files": {
1518
+ "input": "input.html",
1519
+ "gnd": "gnd.json"
1520
+ }
1521
+ },
1522
+ {
1523
+ "id": "link-content-conversion",
1524
+ "dir": "link-content-conversion",
1525
+ "role": "link",
1526
+ "description": "Every kind of link converts its content the same way, like any other text",
1527
+ "files": {
1528
+ "input": "input.html",
1529
+ "gnd": "gnd.json"
1530
+ }
1531
+ },
1532
+ {
1533
+ "id": "link-content-identity",
1534
+ "dir": "link-content-identity",
1535
+ "role": "link",
1536
+ "description": "A link takes on its content only when that content has no identity of its own: a lone result with an id, description or ref stays its child",
1537
+ "files": {
1538
+ "input": "input.html",
1539
+ "gnd": "gnd.json"
1540
+ }
1541
+ },
1542
+ {
1543
+ "id": "link-content-words",
1544
+ "dir": "link-content-words",
1545
+ "role": "link",
1546
+ "description": "A link's words in its sentence come from all of its content, spaced only where the source has whitespace or a block boundary",
1547
+ "files": {
1548
+ "input": "input.html",
1549
+ "gnd": "gnd.json"
1550
+ }
1551
+ },
1192
1552
  {
1193
1553
  "id": "list-aria-posinset-setsize",
1194
1554
  "dir": "list-aria-posinset-setsize",
@@ -1359,6 +1719,16 @@
1359
1719
  "gnd": "gnd.json"
1360
1720
  }
1361
1721
  },
1722
+ {
1723
+ "id": "math-inline",
1724
+ "dir": "math-inline",
1725
+ "role": "math",
1726
+ "description": "Inline MathML in a sentence becomes a placeholder in the sentence's SSML, with the math object as a child",
1727
+ "files": {
1728
+ "input": "input.html",
1729
+ "gnd": "gnd.json"
1730
+ }
1731
+ },
1362
1732
  {
1363
1733
  "id": "math-no-description",
1364
1734
  "dir": "math-no-description",
@@ -1399,6 +1769,26 @@
1399
1769
  "gnd": "gnd.json"
1400
1770
  }
1401
1771
  },
1772
+ {
1773
+ "id": "nested-blockquote",
1774
+ "dir": "nested-blockquote",
1775
+ "role": "blockquote",
1776
+ "description": "A blockquote whose sole child is another blockquote, a quotation within a quotation: both keep the blockquote role",
1777
+ "files": {
1778
+ "input": "input.html",
1779
+ "gnd": "gnd.json"
1780
+ }
1781
+ },
1782
+ {
1783
+ "id": "nested-section",
1784
+ "dir": "nested-section",
1785
+ "role": "section",
1786
+ "description": "A section whose sole child is another section: both keep the section role",
1787
+ "files": {
1788
+ "input": "input.html",
1789
+ "gnd": "gnd.json"
1790
+ }
1791
+ },
1402
1792
  {
1403
1793
  "id": "noteref-after-closing-straight-quote",
1404
1794
  "dir": "noteref-after-closing-straight-quote",
@@ -1759,6 +2149,26 @@
1759
2149
  "gnd": "gnd.json"
1760
2150
  }
1761
2151
  },
2152
+ {
2153
+ "id": "redundant-role-body-chapter",
2154
+ "dir": "redundant-role-body-chapter",
2155
+ "role": "chapter",
2156
+ "description": "A chapter whose body and sole section both declare it via epub:type: the body keeps the role, the section doesn't repeat it",
2157
+ "files": {
2158
+ "input": "input.xhtml",
2159
+ "gnd": "gnd.json"
2160
+ }
2161
+ },
2162
+ {
2163
+ "id": "redundant-role-nested-chapter",
2164
+ "dir": "redundant-role-nested-chapter",
2165
+ "role": "chapter",
2166
+ "description": "A chapter section whose sole child section declares chapter again via epub:type: the outer section keeps it, the inner one stays a section",
2167
+ "files": {
2168
+ "input": "input.xhtml",
2169
+ "gnd": "gnd.json"
2170
+ }
2171
+ },
1762
2172
  {
1763
2173
  "id": "region-role-aria",
1764
2174
  "dir": "region-role-aria",
@@ -1879,6 +2289,16 @@
1879
2289
  "gnd": "gnd.json"
1880
2290
  }
1881
2291
  },
2292
+ {
2293
+ "id": "table-cell-link",
2294
+ "dir": "table-cell-link",
2295
+ "role": "link",
2296
+ "description": "A link in a table cell; the cell's plain keeps the link's words",
2297
+ "files": {
2298
+ "input": "input.html",
2299
+ "gnd": "gnd.json"
2300
+ }
2301
+ },
1882
2302
  {
1883
2303
  "id": "table-cell-noteref",
1884
2304
  "dir": "table-cell-noteref",
@@ -2099,6 +2519,16 @@
2099
2519
  "gnd": "gnd.json"
2100
2520
  }
2101
2521
  },
2522
+ {
2523
+ "id": "term-span-in-dt",
2524
+ "dir": "term-span-in-dt",
2525
+ "role": "term",
2526
+ "description": "A glossary term whose dt wraps a span with role=\"term\": the term is marked once, on the dt",
2527
+ "files": {
2528
+ "input": "input.html",
2529
+ "gnd": "gnd.json"
2530
+ }
2531
+ },
2102
2532
  {
2103
2533
  "id": "tip-epub-type",
2104
2534
  "dir": "tip-epub-type",
@@ -0,0 +1,22 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "math1",
5
+ "role": [
6
+ "math"
7
+ ],
8
+ "text": {
9
+ "ssml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mi>x</mi></math>"
10
+ },
11
+ "textref": "#css(math)"
12
+ }
13
+ ],
14
+ "role": [
15
+ "paragraph"
16
+ ],
17
+ "text": {
18
+ "plain": "Since holds.",
19
+ "ssml": "Since <readium:math id=\"math1\" /> holds.",
20
+ "language": "en"
21
+ }
22
+ }
@@ -0,0 +1 @@
1
+ <p>Since <math><mi>x</mi></math> holds.</p>