@readium/guided-navigation 1.2.2 → 1.2.4

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 (148) 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/object.js +1 -1
  5. package/dist/roles.js +1 -1
  6. package/fixtures/ROLES_COVERAGE.md +12 -10
  7. package/fixtures/abbreviation-nested-term-punctuation/gnd.json +6 -6
  8. package/fixtures/abbreviation-nested-term-punctuation/input.html +1 -1
  9. package/fixtures/abbreviation-nested-term-punctuation/meta.json +1 -1
  10. package/fixtures/accessible-name-labelledby-aria-hidden/gnd.json +1 -1
  11. package/fixtures/accessible-name-labelledby-hidden-attribute/gnd.json +1 -1
  12. package/fixtures/biblioref-target-descendant-ids/gnd.json +3 -3
  13. package/fixtures/biblioref-target-in-bibliography-role-aria/gnd.json +1 -1
  14. package/fixtures/biblioref-target-mixed-content/gnd.json +3 -3
  15. package/fixtures/description-roleless-lone-child/gnd.json +24 -0
  16. package/fixtures/description-roleless-lone-child/input.html +1 -0
  17. package/fixtures/description-roleless-lone-child/meta.json +11 -0
  18. package/fixtures/description-roleless-wrapper/gnd.json +25 -0
  19. package/fixtures/description-roleless-wrapper/input.html +1 -0
  20. package/fixtures/description-roleless-wrapper/meta.json +10 -0
  21. package/fixtures/glossary-role-aria/gnd.json +23 -31
  22. package/fixtures/glossref-role-aria-mid-sentence/gnd.json +1 -1
  23. package/fixtures/glossref-sole-content/gnd.json +12 -20
  24. package/fixtures/glossref-target-in-glossary-role-aria/gnd.json +13 -21
  25. package/fixtures/glossref-target-percent-encoded/gnd.json +1 -1
  26. package/fixtures/language-alt-inherited/gnd.json +25 -0
  27. package/fixtures/language-alt-inherited/input.html +1 -0
  28. package/fixtures/language-alt-inherited/meta.json +11 -0
  29. package/fixtures/language-alt-own-lang/gnd.json +25 -0
  30. package/fixtures/language-alt-own-lang/input.html +1 -0
  31. package/fixtures/language-alt-own-lang/meta.json +11 -0
  32. package/fixtures/language-block-empty-lang/gnd.json +8 -0
  33. package/fixtures/language-block-empty-lang/input.html +1 -0
  34. package/fixtures/language-block-empty-lang/meta.json +10 -0
  35. package/fixtures/language-describedby-shared/gnd.json +49 -0
  36. package/fixtures/language-describedby-shared/input.html +1 -0
  37. package/fixtures/language-describedby-shared/meta.json +12 -0
  38. package/fixtures/language-empty-lang-stops-inheritance/gnd.json +24 -0
  39. package/fixtures/language-empty-lang-stops-inheritance/input.html +1 -0
  40. package/fixtures/language-empty-lang-stops-inheritance/meta.json +11 -0
  41. package/fixtures/language-figcaption/gnd.json +25 -0
  42. package/fixtures/language-figcaption/input.html +1 -0
  43. package/fixtures/language-figcaption/meta.json +11 -0
  44. package/fixtures/language-figcaption-credit/gnd.json +41 -0
  45. package/fixtures/language-figcaption-credit/input.html +1 -0
  46. package/fixtures/language-figcaption-credit/meta.json +12 -0
  47. package/fixtures/language-figcaption-switches/gnd.json +24 -0
  48. package/fixtures/language-figcaption-switches/input.html +1 -0
  49. package/fixtures/language-figcaption-switches/meta.json +11 -0
  50. package/fixtures/language-figcaption-switches-throughout/gnd.json +25 -0
  51. package/fixtures/language-figcaption-switches-throughout/input.html +1 -0
  52. package/fixtures/language-figcaption-switches-throughout/meta.json +11 -0
  53. package/fixtures/language-inline-case-insensitive/gnd.json +9 -0
  54. package/fixtures/language-inline-case-insensitive/input.html +1 -0
  55. package/fixtures/language-inline-case-insensitive/meta.json +10 -0
  56. package/fixtures/language-inline-case-insensitive-ssml/gnd.json +9 -0
  57. package/fixtures/language-inline-case-insensitive-ssml/input.html +1 -0
  58. package/fixtures/language-inline-case-insensitive-ssml/meta.json +10 -0
  59. package/fixtures/language-inline-empty-lang/gnd.json +9 -0
  60. package/fixtures/language-inline-empty-lang/input.html +1 -0
  61. package/fixtures/language-inline-empty-lang/meta.json +10 -0
  62. package/fixtures/language-inline-empty-lang-formatted/gnd.json +8 -0
  63. package/fixtures/language-inline-empty-lang-formatted/input.html +1 -0
  64. package/fixtures/language-inline-empty-lang-formatted/meta.json +10 -0
  65. package/fixtures/language-inline-empty-lang-only/gnd.json +8 -0
  66. package/fixtures/language-inline-empty-lang-only/input.html +1 -0
  67. package/fixtures/language-inline-empty-lang-only/meta.json +10 -0
  68. package/fixtures/language-inline-empty-lang-undeclared/gnd.json +9 -0
  69. package/fixtures/language-inline-empty-lang-undeclared/input.html +1 -0
  70. package/fixtures/language-inline-empty-lang-undeclared/meta.json +10 -0
  71. package/fixtures/language-labelledby-target/gnd.json +26 -0
  72. package/fixtures/language-labelledby-target/input.html +1 -0
  73. package/fixtures/language-labelledby-target/meta.json +11 -0
  74. package/fixtures/language-labelledby-target-aria-label/gnd.json +32 -0
  75. package/fixtures/language-labelledby-target-aria-label/input.html +1 -0
  76. package/fixtures/language-labelledby-target-aria-label/meta.json +11 -0
  77. package/fixtures/language-labelledby-target-switches/gnd.json +25 -0
  78. package/fixtures/language-labelledby-target-switches/input.html +1 -0
  79. package/fixtures/language-labelledby-target-switches/meta.json +11 -0
  80. package/fixtures/language-labelledby-targets-case/gnd.json +36 -0
  81. package/fixtures/language-labelledby-targets-case/input.html +1 -0
  82. package/fixtures/language-labelledby-targets-case/meta.json +11 -0
  83. package/fixtures/language-labelledby-targets-differ/gnd.json +35 -0
  84. package/fixtures/language-labelledby-targets-differ/input.html +1 -0
  85. package/fixtures/language-labelledby-targets-differ/meta.json +11 -0
  86. package/fixtures/language-link-switches/gnd.json +20 -0
  87. package/fixtures/language-link-switches/input.html +1 -0
  88. package/fixtures/language-link-switches/meta.json +11 -0
  89. package/fixtures/language-pagebreak-label/gnd.json +22 -0
  90. package/fixtures/language-pagebreak-label/input.html +1 -0
  91. package/fixtures/language-pagebreak-label/meta.json +11 -0
  92. package/fixtures/language-undeclared-description/gnd.json +23 -0
  93. package/fixtures/language-undeclared-description/input.html +1 -0
  94. package/fixtures/language-undeclared-description/meta.json +11 -0
  95. package/fixtures/language-xml-lang-empty-html-inherits/gnd.json +25 -0
  96. package/fixtures/language-xml-lang-empty-html-inherits/input.html +1 -0
  97. package/fixtures/language-xml-lang-empty-html-inherits/meta.json +11 -0
  98. package/fixtures/language-xml-lang-empty-html-lang-applies/gnd.json +25 -0
  99. package/fixtures/language-xml-lang-empty-html-lang-applies/input.html +1 -0
  100. package/fixtures/language-xml-lang-empty-html-lang-applies/meta.json +11 -0
  101. package/fixtures/language-xml-lang-empty-xhtml/gnd.json +24 -0
  102. package/fixtures/language-xml-lang-empty-xhtml/input.xhtml +2 -0
  103. package/fixtures/language-xml-lang-empty-xhtml/meta.json +11 -0
  104. package/fixtures/language-xml-lang-over-lang/gnd.json +25 -0
  105. package/fixtures/language-xml-lang-over-lang/input.html +1 -0
  106. package/fixtures/language-xml-lang-over-lang/meta.json +11 -0
  107. package/fixtures/link-containing-image/gnd.json +35 -0
  108. package/fixtures/link-containing-image/input.html +1 -0
  109. package/fixtures/link-containing-image/meta.json +12 -0
  110. package/fixtures/link-containing-pagebreak/gnd.json +33 -0
  111. package/fixtures/link-containing-pagebreak/input.html +1 -0
  112. package/fixtures/link-containing-pagebreak/meta.json +12 -0
  113. package/fixtures/link-content-conversion/gnd.json +31 -0
  114. package/fixtures/link-content-conversion/input.html +1 -0
  115. package/fixtures/link-content-conversion/meta.json +12 -0
  116. package/fixtures/link-content-identity/gnd.json +21 -0
  117. package/fixtures/link-content-identity/input.html +1 -0
  118. package/fixtures/link-content-identity/meta.json +10 -0
  119. package/fixtures/link-content-words/gnd.json +46 -0
  120. package/fixtures/link-content-words/input.html +1 -0
  121. package/fixtures/link-content-words/meta.json +10 -0
  122. package/fixtures/manifest.json +401 -1
  123. package/fixtures/math-inline/gnd.json +22 -0
  124. package/fixtures/math-inline/input.html +1 -0
  125. package/fixtures/math-inline/meta.json +11 -0
  126. package/fixtures/nested-blockquote/gnd.json +22 -0
  127. package/fixtures/nested-blockquote/input.html +5 -0
  128. package/fixtures/nested-blockquote/meta.json +11 -0
  129. package/fixtures/nested-section/gnd.json +22 -0
  130. package/fixtures/nested-section/input.html +5 -0
  131. package/fixtures/nested-section/meta.json +11 -0
  132. package/fixtures/redundant-role-body-chapter/gnd.json +23 -0
  133. package/fixtures/redundant-role-body-chapter/input.xhtml +10 -0
  134. package/fixtures/redundant-role-body-chapter/meta.json +13 -0
  135. package/fixtures/redundant-role-nested-chapter/gnd.json +30 -0
  136. package/fixtures/redundant-role-nested-chapter/input.xhtml +12 -0
  137. package/fixtures/redundant-role-nested-chapter/meta.json +13 -0
  138. package/fixtures/term-span-in-dt/gnd.json +24 -0
  139. package/fixtures/term-span-in-dt/input.html +4 -0
  140. package/fixtures/term-span-in-dt/meta.json +12 -0
  141. package/package.json +3 -3
  142. package/src/converter.ts +72 -15
  143. package/src/elementHandlers.ts +31 -11
  144. package/src/object.ts +7 -10
  145. package/src/roles.ts +49 -0
  146. package/types/src/converter.d.ts +21 -2
  147. package/types/src/object.d.ts +1 -0
  148. package/types/src/roles.d.ts +1 -0
@@ -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"
@@ -599,6 +599,26 @@
599
599
  "gnd": "gnd.json"
600
600
  }
601
601
  },
602
+ {
603
+ "id": "description-roleless-lone-child",
604
+ "dir": "description-roleless-lone-child",
605
+ "role": "description",
606
+ "description": "A lone roleless child with a description is not hoisted into its parent",
607
+ "files": {
608
+ "input": "input.html",
609
+ "gnd": "gnd.json"
610
+ }
611
+ },
612
+ {
613
+ "id": "description-roleless-wrapper",
614
+ "dir": "description-roleless-wrapper",
615
+ "role": "description",
616
+ "description": "A roleless wrapper with a description is kept as an object, not spliced into its parent",
617
+ "files": {
618
+ "input": "input.html",
619
+ "gnd": "gnd.json"
620
+ }
621
+ },
602
622
  {
603
623
  "id": "details-html-native",
604
624
  "dir": "details-html-native",
@@ -1129,6 +1149,26 @@
1129
1149
  "gnd": "gnd.json"
1130
1150
  }
1131
1151
  },
1152
+ {
1153
+ "id": "language-alt-inherited",
1154
+ "dir": "language-alt-inherited",
1155
+ "role": "image",
1156
+ "description": "An image's alt is in the language inherited by its element",
1157
+ "files": {
1158
+ "input": "input.html",
1159
+ "gnd": "gnd.json"
1160
+ }
1161
+ },
1162
+ {
1163
+ "id": "language-alt-own-lang",
1164
+ "dir": "language-alt-own-lang",
1165
+ "role": "image",
1166
+ "description": "An image's alt is in the language its own element declares",
1167
+ "files": {
1168
+ "input": "input.html",
1169
+ "gnd": "gnd.json"
1170
+ }
1171
+ },
1132
1172
  {
1133
1173
  "id": "language-block",
1134
1174
  "dir": "language-block",
@@ -1139,6 +1179,26 @@
1139
1179
  "gnd": "gnd.json"
1140
1180
  }
1141
1181
  },
1182
+ {
1183
+ "id": "language-block-empty-lang",
1184
+ "dir": "language-block-empty-lang",
1185
+ "role": "language",
1186
+ "description": "A block in an empty lang declaration isn't defaulted to English, while its inline shifts are kept in SSML",
1187
+ "files": {
1188
+ "input": "input.html",
1189
+ "gnd": "gnd.json"
1190
+ }
1191
+ },
1192
+ {
1193
+ "id": "language-describedby-shared",
1194
+ "dir": "language-describedby-shared",
1195
+ "role": "figure",
1196
+ "description": "An aria-describedby description is in its targets' shared language",
1197
+ "files": {
1198
+ "input": "input.html",
1199
+ "gnd": "gnd.json"
1200
+ }
1201
+ },
1142
1202
  {
1143
1203
  "id": "language-document",
1144
1204
  "dir": "language-document",
@@ -1149,6 +1209,116 @@
1149
1209
  "gnd": "gnd.json"
1150
1210
  }
1151
1211
  },
1212
+ {
1213
+ "id": "language-empty-lang-stops-inheritance",
1214
+ "dir": "language-empty-lang-stops-inheritance",
1215
+ "role": "language",
1216
+ "description": "An empty lang declaration stops inheritance, leaving an image's alt with no language",
1217
+ "files": {
1218
+ "input": "input.html",
1219
+ "gnd": "gnd.json"
1220
+ }
1221
+ },
1222
+ {
1223
+ "id": "language-figcaption",
1224
+ "dir": "language-figcaption",
1225
+ "role": "figure",
1226
+ "description": "A figure's implicit caption description is in the caption's language",
1227
+ "files": {
1228
+ "input": "input.html",
1229
+ "gnd": "gnd.json"
1230
+ }
1231
+ },
1232
+ {
1233
+ "id": "language-figcaption-credit",
1234
+ "dir": "language-figcaption-credit",
1235
+ "role": "figure",
1236
+ "description": "A figure's caption description language ignores a credit spoken separately",
1237
+ "files": {
1238
+ "input": "input.html",
1239
+ "gnd": "gnd.json"
1240
+ }
1241
+ },
1242
+ {
1243
+ "id": "language-figcaption-switches",
1244
+ "dir": "language-figcaption-switches",
1245
+ "role": "figure",
1246
+ "description": "A figure's caption description has no language when its text switches language",
1247
+ "files": {
1248
+ "input": "input.html",
1249
+ "gnd": "gnd.json"
1250
+ }
1251
+ },
1252
+ {
1253
+ "id": "language-figcaption-switches-throughout",
1254
+ "dir": "language-figcaption-switches-throughout",
1255
+ "role": "figure",
1256
+ "description": "A figure's caption description is in the language its text switches to throughout",
1257
+ "files": {
1258
+ "input": "input.html",
1259
+ "gnd": "gnd.json"
1260
+ }
1261
+ },
1262
+ {
1263
+ "id": "language-inline-case-insensitive",
1264
+ "dir": "language-inline-case-insensitive",
1265
+ "role": "language",
1266
+ "description": "Inline language declarations differing only in case from the block's are the same language: no SSML shift",
1267
+ "files": {
1268
+ "input": "input.html",
1269
+ "gnd": "gnd.json"
1270
+ }
1271
+ },
1272
+ {
1273
+ "id": "language-inline-case-insensitive-ssml",
1274
+ "dir": "language-inline-case-insensitive-ssml",
1275
+ "role": "language",
1276
+ "description": "Inline language declarations differing only in case are not tagged as shifts in SSML produced for other reasons",
1277
+ "files": {
1278
+ "input": "input.html",
1279
+ "gnd": "gnd.json"
1280
+ }
1281
+ },
1282
+ {
1283
+ "id": "language-inline-empty-lang",
1284
+ "dir": "language-inline-empty-lang",
1285
+ "role": "language",
1286
+ "description": "An empty lang declaration inside a known language is an explicit language shift in SSML",
1287
+ "files": {
1288
+ "input": "input.html",
1289
+ "gnd": "gnd.json"
1290
+ }
1291
+ },
1292
+ {
1293
+ "id": "language-inline-empty-lang-formatted",
1294
+ "dir": "language-inline-empty-lang-formatted",
1295
+ "role": "language",
1296
+ "description": "Formatted text only in an empty lang declaration has no language",
1297
+ "files": {
1298
+ "input": "input.html",
1299
+ "gnd": "gnd.json"
1300
+ }
1301
+ },
1302
+ {
1303
+ "id": "language-inline-empty-lang-only",
1304
+ "dir": "language-inline-empty-lang-only",
1305
+ "role": "language",
1306
+ "description": "Text only in an empty lang declaration has no language",
1307
+ "files": {
1308
+ "input": "input.html",
1309
+ "gnd": "gnd.json"
1310
+ }
1311
+ },
1312
+ {
1313
+ "id": "language-inline-empty-lang-undeclared",
1314
+ "dir": "language-inline-empty-lang-undeclared",
1315
+ "role": "language",
1316
+ "description": "An empty lang declaration is a language shift in SSML even when no language is declared around it",
1317
+ "files": {
1318
+ "input": "input.html",
1319
+ "gnd": "gnd.json"
1320
+ }
1321
+ },
1152
1322
  {
1153
1323
  "id": "language-inline-lang-attribute",
1154
1324
  "dir": "language-inline-lang-attribute",
@@ -1189,6 +1359,176 @@
1189
1359
  "gnd": "gnd.json"
1190
1360
  }
1191
1361
  },
1362
+ {
1363
+ "id": "language-labelledby-target",
1364
+ "dir": "language-labelledby-target",
1365
+ "role": "image",
1366
+ "description": "An aria-labelledby description is in its target's language",
1367
+ "files": {
1368
+ "input": "input.html",
1369
+ "gnd": "gnd.json"
1370
+ }
1371
+ },
1372
+ {
1373
+ "id": "language-labelledby-target-aria-label",
1374
+ "dir": "language-labelledby-target-aria-label",
1375
+ "role": "image",
1376
+ "description": "An aria-labelledby target's own aria-label is in that target's language",
1377
+ "files": {
1378
+ "input": "input.html",
1379
+ "gnd": "gnd.json"
1380
+ }
1381
+ },
1382
+ {
1383
+ "id": "language-labelledby-target-switches",
1384
+ "dir": "language-labelledby-target-switches",
1385
+ "role": "image",
1386
+ "description": "An aria-labelledby description has no language when its text switches language inside a target",
1387
+ "files": {
1388
+ "input": "input.html",
1389
+ "gnd": "gnd.json"
1390
+ }
1391
+ },
1392
+ {
1393
+ "id": "language-labelledby-targets-case",
1394
+ "dir": "language-labelledby-targets-case",
1395
+ "role": "image",
1396
+ "description": "An aria-labelledby description is in its targets' language when their declarations differ only in case",
1397
+ "files": {
1398
+ "input": "input.html",
1399
+ "gnd": "gnd.json"
1400
+ }
1401
+ },
1402
+ {
1403
+ "id": "language-labelledby-targets-differ",
1404
+ "dir": "language-labelledby-targets-differ",
1405
+ "role": "image",
1406
+ "description": "An aria-labelledby description has no language when its targets' languages differ",
1407
+ "files": {
1408
+ "input": "input.html",
1409
+ "gnd": "gnd.json"
1410
+ }
1411
+ },
1412
+ {
1413
+ "id": "language-link-switches",
1414
+ "dir": "language-link-switches",
1415
+ "role": "link",
1416
+ "description": "A language switch inside a link stays in the link's own SSML",
1417
+ "files": {
1418
+ "input": "input.html",
1419
+ "gnd": "gnd.json"
1420
+ }
1421
+ },
1422
+ {
1423
+ "id": "language-pagebreak-label",
1424
+ "dir": "language-pagebreak-label",
1425
+ "role": "pagebreak",
1426
+ "description": "A pagebreak's label is in its element's language",
1427
+ "files": {
1428
+ "input": "input.html",
1429
+ "gnd": "gnd.json"
1430
+ }
1431
+ },
1432
+ {
1433
+ "id": "language-undeclared-description",
1434
+ "dir": "language-undeclared-description",
1435
+ "role": "image",
1436
+ "description": "An image's alt has no language when none is declared",
1437
+ "files": {
1438
+ "input": "input.html",
1439
+ "gnd": "gnd.json"
1440
+ }
1441
+ },
1442
+ {
1443
+ "id": "language-xml-lang-empty-html-inherits",
1444
+ "dir": "language-xml-lang-empty-html-inherits",
1445
+ "role": "language",
1446
+ "description": "An empty xml:lang has no effect in HTML, so the inherited language applies",
1447
+ "files": {
1448
+ "input": "input.html",
1449
+ "gnd": "gnd.json"
1450
+ }
1451
+ },
1452
+ {
1453
+ "id": "language-xml-lang-empty-html-lang-applies",
1454
+ "dir": "language-xml-lang-empty-html-lang-applies",
1455
+ "role": "language",
1456
+ "description": "An empty xml:lang has no effect in HTML, so lang on the same element applies",
1457
+ "files": {
1458
+ "input": "input.html",
1459
+ "gnd": "gnd.json"
1460
+ }
1461
+ },
1462
+ {
1463
+ "id": "language-xml-lang-empty-xhtml",
1464
+ "dir": "language-xml-lang-empty-xhtml",
1465
+ "role": "language",
1466
+ "description": "An empty xml:lang in XHTML makes the language unknown, over lang on the same element",
1467
+ "files": {
1468
+ "input": "input.xhtml",
1469
+ "gnd": "gnd.json"
1470
+ }
1471
+ },
1472
+ {
1473
+ "id": "language-xml-lang-over-lang",
1474
+ "dir": "language-xml-lang-over-lang",
1475
+ "role": "language",
1476
+ "description": "xml:lang wins over lang on the same element",
1477
+ "files": {
1478
+ "input": "input.html",
1479
+ "gnd": "gnd.json"
1480
+ }
1481
+ },
1482
+ {
1483
+ "id": "link-containing-image",
1484
+ "dir": "link-containing-image",
1485
+ "role": "link",
1486
+ "description": "An image inside a link is the link's own child, placed in the link's SSML",
1487
+ "files": {
1488
+ "input": "input.html",
1489
+ "gnd": "gnd.json"
1490
+ }
1491
+ },
1492
+ {
1493
+ "id": "link-containing-pagebreak",
1494
+ "dir": "link-containing-pagebreak",
1495
+ "role": "link",
1496
+ "description": "A pagebreak inside a link is the link's own child, its page number kept out of the link's text",
1497
+ "files": {
1498
+ "input": "input.html",
1499
+ "gnd": "gnd.json"
1500
+ }
1501
+ },
1502
+ {
1503
+ "id": "link-content-conversion",
1504
+ "dir": "link-content-conversion",
1505
+ "role": "link",
1506
+ "description": "Every kind of link converts its content the same way, like any other text",
1507
+ "files": {
1508
+ "input": "input.html",
1509
+ "gnd": "gnd.json"
1510
+ }
1511
+ },
1512
+ {
1513
+ "id": "link-content-identity",
1514
+ "dir": "link-content-identity",
1515
+ "role": "link",
1516
+ "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",
1517
+ "files": {
1518
+ "input": "input.html",
1519
+ "gnd": "gnd.json"
1520
+ }
1521
+ },
1522
+ {
1523
+ "id": "link-content-words",
1524
+ "dir": "link-content-words",
1525
+ "role": "link",
1526
+ "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",
1527
+ "files": {
1528
+ "input": "input.html",
1529
+ "gnd": "gnd.json"
1530
+ }
1531
+ },
1192
1532
  {
1193
1533
  "id": "list-aria-posinset-setsize",
1194
1534
  "dir": "list-aria-posinset-setsize",
@@ -1359,6 +1699,16 @@
1359
1699
  "gnd": "gnd.json"
1360
1700
  }
1361
1701
  },
1702
+ {
1703
+ "id": "math-inline",
1704
+ "dir": "math-inline",
1705
+ "role": "math",
1706
+ "description": "Inline MathML in a sentence becomes a placeholder in the sentence's SSML, with the math object as a child",
1707
+ "files": {
1708
+ "input": "input.html",
1709
+ "gnd": "gnd.json"
1710
+ }
1711
+ },
1362
1712
  {
1363
1713
  "id": "math-no-description",
1364
1714
  "dir": "math-no-description",
@@ -1399,6 +1749,26 @@
1399
1749
  "gnd": "gnd.json"
1400
1750
  }
1401
1751
  },
1752
+ {
1753
+ "id": "nested-blockquote",
1754
+ "dir": "nested-blockquote",
1755
+ "role": "blockquote",
1756
+ "description": "A blockquote whose sole child is another blockquote, a quotation within a quotation: both keep the blockquote role",
1757
+ "files": {
1758
+ "input": "input.html",
1759
+ "gnd": "gnd.json"
1760
+ }
1761
+ },
1762
+ {
1763
+ "id": "nested-section",
1764
+ "dir": "nested-section",
1765
+ "role": "section",
1766
+ "description": "A section whose sole child is another section: both keep the section role",
1767
+ "files": {
1768
+ "input": "input.html",
1769
+ "gnd": "gnd.json"
1770
+ }
1771
+ },
1402
1772
  {
1403
1773
  "id": "noteref-after-closing-straight-quote",
1404
1774
  "dir": "noteref-after-closing-straight-quote",
@@ -1759,6 +2129,26 @@
1759
2129
  "gnd": "gnd.json"
1760
2130
  }
1761
2131
  },
2132
+ {
2133
+ "id": "redundant-role-body-chapter",
2134
+ "dir": "redundant-role-body-chapter",
2135
+ "role": "chapter",
2136
+ "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",
2137
+ "files": {
2138
+ "input": "input.xhtml",
2139
+ "gnd": "gnd.json"
2140
+ }
2141
+ },
2142
+ {
2143
+ "id": "redundant-role-nested-chapter",
2144
+ "dir": "redundant-role-nested-chapter",
2145
+ "role": "chapter",
2146
+ "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",
2147
+ "files": {
2148
+ "input": "input.xhtml",
2149
+ "gnd": "gnd.json"
2150
+ }
2151
+ },
1762
2152
  {
1763
2153
  "id": "region-role-aria",
1764
2154
  "dir": "region-role-aria",
@@ -2099,6 +2489,16 @@
2099
2489
  "gnd": "gnd.json"
2100
2490
  }
2101
2491
  },
2492
+ {
2493
+ "id": "term-span-in-dt",
2494
+ "dir": "term-span-in-dt",
2495
+ "role": "term",
2496
+ "description": "A glossary term whose dt wraps a span with role=\"term\": the term is marked once, on the dt",
2497
+ "files": {
2498
+ "input": "input.html",
2499
+ "gnd": "gnd.json"
2500
+ }
2501
+ },
2102
2502
  {
2103
2503
  "id": "tip-epub-type",
2104
2504
  "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>
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "math-inline",
3
+ "description": "Inline MathML in a sentence becomes a placeholder in the sentence's SSML, with the math object as a child",
4
+ "role": "math",
5
+ "rolesCovered": [
6
+ "paragraph",
7
+ "math"
8
+ ],
9
+ "sourceRef": "https://github.com/readium/guided-navigation/tree/main/examples/read-aloud",
10
+ "inputKind": "fragment"
11
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "children": [
5
+ {
6
+ "role": [
7
+ "paragraph"
8
+ ],
9
+ "text": {
10
+ "plain": "The light must never go out."
11
+ }
12
+ }
13
+ ],
14
+ "role": [
15
+ "blockquote"
16
+ ]
17
+ }
18
+ ],
19
+ "role": [
20
+ "blockquote"
21
+ ]
22
+ }
@@ -0,0 +1,5 @@
1
+ <blockquote>
2
+ <blockquote>
3
+ <p>The light must never go out.</p>
4
+ </blockquote>
5
+ </blockquote>
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "nested-blockquote",
3
+ "description": "A blockquote whose sole child is another blockquote, a quotation within a quotation: both keep the blockquote role",
4
+ "role": "blockquote",
5
+ "rolesCovered": [
6
+ "blockquote",
7
+ "paragraph"
8
+ ],
9
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
10
+ "inputKind": "fragment"
11
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "children": [
5
+ {
6
+ "role": [
7
+ "paragraph"
8
+ ],
9
+ "text": {
10
+ "plain": "The keeper climbed the stairs."
11
+ }
12
+ }
13
+ ],
14
+ "role": [
15
+ "section"
16
+ ]
17
+ }
18
+ ],
19
+ "role": [
20
+ "section"
21
+ ]
22
+ }
@@ -0,0 +1,5 @@
1
+ <section>
2
+ <section>
3
+ <p>The keeper climbed the stairs.</p>
4
+ </section>
5
+ </section>