@readium/guided-navigation 1.1.3 → 1.2.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 (126) hide show
  1. package/README.md +1 -1
  2. package/dist/a11y.js +1 -1
  3. package/dist/converter.js +1 -1
  4. package/dist/elementHandlers.js +1 -1
  5. package/dist/emptyPairs.js +1 -0
  6. package/dist/object.js +1 -1
  7. package/dist/prescan.js +1 -1
  8. package/dist/roles.js +1 -1
  9. package/dist/text.js +1 -1
  10. package/dist/textrefFragment.js +1 -1
  11. package/fixtures/ROLES_COVERAGE.md +5 -4
  12. package/fixtures/abbreviation-acronym-html-native/gnd.json +9 -0
  13. package/fixtures/abbreviation-acronym-html-native/input.html +1 -0
  14. package/fixtures/abbreviation-acronym-html-native/meta.json +11 -0
  15. package/fixtures/abbreviation-before-formatting/gnd.json +9 -0
  16. package/fixtures/abbreviation-before-formatting/input.html +1 -0
  17. package/fixtures/abbreviation-before-formatting/meta.json +11 -0
  18. package/fixtures/abbreviation-before-image/gnd.json +24 -0
  19. package/fixtures/abbreviation-before-image/input.html +1 -0
  20. package/fixtures/abbreviation-before-image/meta.json +12 -0
  21. package/fixtures/abbreviation-html-native/gnd.json +9 -0
  22. package/fixtures/abbreviation-html-native/input.html +1 -0
  23. package/fixtures/abbreviation-html-native/meta.json +11 -0
  24. package/fixtures/abbreviation-language/gnd.json +9 -0
  25. package/fixtures/abbreviation-language/input.html +1 -0
  26. package/fixtures/abbreviation-language/meta.json +11 -0
  27. package/fixtures/abbreviation-line-break/gnd.json +9 -0
  28. package/fixtures/abbreviation-line-break/input.html +1 -0
  29. package/fixtures/abbreviation-line-break/meta.json +11 -0
  30. package/fixtures/abbreviation-nested/gnd.json +9 -0
  31. package/fixtures/abbreviation-nested/input.html +1 -0
  32. package/fixtures/abbreviation-nested/meta.json +11 -0
  33. package/fixtures/abbreviation-nested-emphasis/gnd.json +9 -0
  34. package/fixtures/abbreviation-nested-emphasis/input.html +1 -0
  35. package/fixtures/abbreviation-nested-emphasis/meta.json +11 -0
  36. package/fixtures/abbreviation-nested-term/gnd.json +21 -0
  37. package/fixtures/abbreviation-nested-term/input.html +1 -0
  38. package/fixtures/abbreviation-nested-term/meta.json +12 -0
  39. package/fixtures/abbreviation-nested-term-punctuation/gnd.json +26 -0
  40. package/fixtures/abbreviation-nested-term-punctuation/input.html +1 -0
  41. package/fixtures/abbreviation-nested-term-punctuation/meta.json +12 -0
  42. package/fixtures/abbreviation-no-title/gnd.json +8 -0
  43. package/fixtures/abbreviation-no-title/input.html +1 -0
  44. package/fixtures/abbreviation-no-title/meta.json +11 -0
  45. package/fixtures/abbreviation-spanning-terms/gnd.json +33 -0
  46. package/fixtures/abbreviation-spanning-terms/input.html +1 -0
  47. package/fixtures/abbreviation-spanning-terms/meta.json +12 -0
  48. package/fixtures/abbreviation-with-image/gnd.json +24 -0
  49. package/fixtures/abbreviation-with-image/input.html +1 -0
  50. package/fixtures/abbreviation-with-image/meta.json +12 -0
  51. package/fixtures/abbreviation-with-svg-and-math/gnd.json +39 -0
  52. package/fixtures/abbreviation-with-svg-and-math/input.html +1 -0
  53. package/fixtures/abbreviation-with-svg-and-math/meta.json +13 -0
  54. package/fixtures/biblioref-target-descendant-ids/gnd.json +90 -0
  55. package/fixtures/biblioref-target-descendant-ids/input.html +1 -0
  56. package/fixtures/biblioref-target-descendant-ids/meta.json +14 -0
  57. package/fixtures/biblioref-target-in-bibliography-role-aria/gnd.json +59 -0
  58. package/fixtures/biblioref-target-in-bibliography-role-aria/input.html +6 -0
  59. package/fixtures/biblioref-target-in-bibliography-role-aria/meta.json +14 -0
  60. package/fixtures/biblioref-target-mixed-content/gnd.json +63 -0
  61. package/fixtures/biblioref-target-mixed-content/input.html +1 -0
  62. package/fixtures/biblioref-target-mixed-content/meta.json +11 -0
  63. package/fixtures/glossref-target-in-glossary-role-aria/gnd.json +76 -0
  64. package/fixtures/glossref-target-in-glossary-role-aria/input.html +5 -0
  65. package/fixtures/glossref-target-in-glossary-role-aria/meta.json +14 -0
  66. package/fixtures/glossref-target-percent-encoded/gnd.json +68 -0
  67. package/fixtures/glossref-target-percent-encoded/input.html +1 -0
  68. package/fixtures/glossref-target-percent-encoded/meta.json +14 -0
  69. package/fixtures/manifest.json +330 -0
  70. package/fixtures/noteref-after-closing-straight-quote/gnd.json +32 -0
  71. package/fixtures/noteref-after-closing-straight-quote/input.html +1 -0
  72. package/fixtures/noteref-after-closing-straight-quote/meta.json +13 -0
  73. package/fixtures/noteref-after-closing-straight-quote-split/gnd.json +38 -0
  74. package/fixtures/noteref-after-closing-straight-quote-split/input.html +1 -0
  75. package/fixtures/noteref-after-closing-straight-quote-split/meta.json +12 -0
  76. package/fixtures/noteref-enclosed-across-formatting/gnd.json +32 -0
  77. package/fixtures/noteref-enclosed-across-formatting/input.html +1 -0
  78. package/fixtures/noteref-enclosed-across-formatting/meta.json +13 -0
  79. package/fixtures/noteref-enclosed-adjacent-pairs/gnd.json +108 -0
  80. package/fixtures/noteref-enclosed-adjacent-pairs/input.html +1 -0
  81. package/fixtures/noteref-enclosed-adjacent-pairs/meta.json +13 -0
  82. package/fixtures/noteref-enclosed-adjacent-text/gnd.json +34 -0
  83. package/fixtures/noteref-enclosed-adjacent-text/input.html +1 -0
  84. package/fixtures/noteref-enclosed-adjacent-text/meta.json +13 -0
  85. package/fixtures/noteref-enclosed-before-formatting/gnd.json +34 -0
  86. package/fixtures/noteref-enclosed-before-formatting/input.html +1 -0
  87. package/fixtures/noteref-enclosed-before-formatting/meta.json +13 -0
  88. package/fixtures/noteref-enclosed-guillemets-french/gnd.json +103 -0
  89. package/fixtures/noteref-enclosed-guillemets-french/input.html +1 -0
  90. package/fixtures/noteref-enclosed-guillemets-french/meta.json +13 -0
  91. package/fixtures/noteref-enclosed-quotes-chinese/gnd.json +47 -0
  92. package/fixtures/noteref-enclosed-quotes-chinese/input.html +1 -0
  93. package/fixtures/noteref-enclosed-quotes-chinese/meta.json +13 -0
  94. package/fixtures/noteref-enclosed-quotes-german/gnd.json +124 -0
  95. package/fixtures/noteref-enclosed-quotes-german/input.html +1 -0
  96. package/fixtures/noteref-enclosed-quotes-german/meta.json +13 -0
  97. package/fixtures/noteref-enclosed-quotes-swedish/gnd.json +70 -0
  98. package/fixtures/noteref-enclosed-quotes-swedish/input.html +1 -0
  99. package/fixtures/noteref-enclosed-quotes-swedish/meta.json +13 -0
  100. package/fixtures/noteref-enclosed-straight-quotes/gnd.json +32 -0
  101. package/fixtures/noteref-enclosed-straight-quotes/input.html +1 -0
  102. package/fixtures/noteref-enclosed-straight-quotes/meta.json +13 -0
  103. package/fixtures/noteref-in-lone-block/gnd.json +29 -0
  104. package/fixtures/noteref-in-lone-block/input.html +1 -0
  105. package/fixtures/noteref-in-lone-block/meta.json +12 -0
  106. package/fixtures/noteref-target-malformed-escape/gnd.json +32 -0
  107. package/fixtures/noteref-target-malformed-escape/input.html +1 -0
  108. package/fixtures/noteref-target-malformed-escape/meta.json +13 -0
  109. package/fixtures/noteref-target-percent-encoded/gnd.json +32 -0
  110. package/fixtures/noteref-target-percent-encoded/input.html +1 -0
  111. package/fixtures/noteref-target-percent-encoded/meta.json +13 -0
  112. package/package.json +1 -1
  113. package/src/a11y.ts +4 -4
  114. package/src/converter.ts +112 -25
  115. package/src/elementHandlers.ts +64 -11
  116. package/src/emptyPairs.ts +74 -0
  117. package/src/object.ts +4 -0
  118. package/src/prescan.ts +2 -1
  119. package/src/roles.ts +2 -0
  120. package/src/text.ts +3 -1
  121. package/src/textrefFragment.ts +9 -1
  122. package/types/src/converter.d.ts +4 -0
  123. package/types/src/elementHandlers.d.ts +1 -0
  124. package/types/src/emptyPairs.d.ts +3 -0
  125. package/types/src/text.d.ts +1 -0
  126. package/types/src/textrefFragment.d.ts +4 -0
@@ -1,4 +1,144 @@
1
1
  [
2
+ {
3
+ "id": "abbreviation-acronym-html-native",
4
+ "dir": "abbreviation-acronym-html-native",
5
+ "role": "abbreviation",
6
+ "description": "An obsolete acronym with a title becomes an SSML sub, same as abbr",
7
+ "files": {
8
+ "input": "input.html",
9
+ "gnd": "gnd.json"
10
+ }
11
+ },
12
+ {
13
+ "id": "abbreviation-before-formatting",
14
+ "dir": "abbreviation-before-formatting",
15
+ "role": "abbreviation",
16
+ "description": "The space between an abbr and following formatted text stays outside the sub",
17
+ "files": {
18
+ "input": "input.html",
19
+ "gnd": "gnd.json"
20
+ }
21
+ },
22
+ {
23
+ "id": "abbreviation-before-image",
24
+ "dir": "abbreviation-before-image",
25
+ "role": "abbreviation",
26
+ "description": "Whitespace after an abbr and an image stays plain, rather than in a sub that would speak the expansion again",
27
+ "files": {
28
+ "input": "input.html",
29
+ "gnd": "gnd.json"
30
+ }
31
+ },
32
+ {
33
+ "id": "abbreviation-html-native",
34
+ "dir": "abbreviation-html-native",
35
+ "role": "abbreviation",
36
+ "description": "An abbr with a title becomes an SSML sub whose alias is the title",
37
+ "files": {
38
+ "input": "input.html",
39
+ "gnd": "gnd.json"
40
+ }
41
+ },
42
+ {
43
+ "id": "abbreviation-language",
44
+ "dir": "abbreviation-language",
45
+ "role": "abbreviation",
46
+ "description": "An abbr in another language keeps its sub, wrapped in a lang since sub can't carry xml:lang",
47
+ "files": {
48
+ "input": "input.html",
49
+ "gnd": "gnd.json"
50
+ }
51
+ },
52
+ {
53
+ "id": "abbreviation-line-break",
54
+ "dir": "abbreviation-line-break",
55
+ "role": "abbreviation",
56
+ "description": "A line break inside an abbr is only visual: its expansion is still one sub, spoken once",
57
+ "files": {
58
+ "input": "input.html",
59
+ "gnd": "gnd.json"
60
+ }
61
+ },
62
+ {
63
+ "id": "abbreviation-nested",
64
+ "dir": "abbreviation-nested",
65
+ "role": "abbreviation",
66
+ "description": "An abbr nested in another is covered by the outer one's expansion: one sub, spoken once",
67
+ "files": {
68
+ "input": "input.html",
69
+ "gnd": "gnd.json"
70
+ }
71
+ },
72
+ {
73
+ "id": "abbreviation-nested-emphasis",
74
+ "dir": "abbreviation-nested-emphasis",
75
+ "role": "abbreviation",
76
+ "description": "Formatting inside an abbr is dropped: its whole text becomes one sub",
77
+ "files": {
78
+ "input": "input.html",
79
+ "gnd": "gnd.json"
80
+ }
81
+ },
82
+ {
83
+ "id": "abbreviation-nested-term",
84
+ "dir": "abbreviation-nested-term",
85
+ "role": "abbreviation",
86
+ "description": "An abbr wrapping a whole term still expands that term's text",
87
+ "files": {
88
+ "input": "input.html",
89
+ "gnd": "gnd.json"
90
+ }
91
+ },
92
+ {
93
+ "id": "abbreviation-nested-term-punctuation",
94
+ "dir": "abbreviation-nested-term-punctuation",
95
+ "role": "abbreviation",
96
+ "description": "An abbr wrapping a term and punctuation outside it still expands that term's text",
97
+ "files": {
98
+ "input": "input.html",
99
+ "gnd": "gnd.json"
100
+ }
101
+ },
102
+ {
103
+ "id": "abbreviation-no-title",
104
+ "dir": "abbreviation-no-title",
105
+ "role": "abbreviation",
106
+ "description": "An abbr without a title has no expansion, so it stays plain text",
107
+ "files": {
108
+ "input": "input.html",
109
+ "gnd": "gnd.json"
110
+ }
111
+ },
112
+ {
113
+ "id": "abbreviation-spanning-terms",
114
+ "dir": "abbreviation-spanning-terms",
115
+ "role": "abbreviation",
116
+ "description": "An abbr spanning several terms isn't expanded, rather than repeated in each or spoken over the text between them",
117
+ "files": {
118
+ "input": "input.html",
119
+ "gnd": "gnd.json"
120
+ }
121
+ },
122
+ {
123
+ "id": "abbreviation-with-image",
124
+ "dir": "abbreviation-with-image",
125
+ "role": "abbreviation",
126
+ "description": "An image inside an abbr doesn't split its expansion: one sub, followed by the image's placeholder",
127
+ "files": {
128
+ "input": "input.html",
129
+ "gnd": "gnd.json"
130
+ }
131
+ },
132
+ {
133
+ "id": "abbreviation-with-svg-and-math",
134
+ "dir": "abbreviation-with-svg-and-math",
135
+ "role": "abbreviation",
136
+ "description": "An SVG image or math inside an abbr doesn't split its expansion: one sub, followed by the object's placeholder",
137
+ "files": {
138
+ "input": "input.html",
139
+ "gnd": "gnd.json"
140
+ }
141
+ },
2
142
  {
3
143
  "id": "abstract-epub-type",
4
144
  "dir": "abstract-epub-type",
@@ -219,6 +359,36 @@
219
359
  "gnd": "gnd.json"
220
360
  }
221
361
  },
362
+ {
363
+ "id": "biblioref-target-descendant-ids",
364
+ "dir": "biblioref-target-descendant-ids",
365
+ "role": "biblioref",
366
+ "description": "A biblioref's embedded copy drops the ids its original keeps, inner ones included, and gives its placeholders new ones, so no id appears twice",
367
+ "files": {
368
+ "input": "input.html",
369
+ "gnd": "gnd.json"
370
+ }
371
+ },
372
+ {
373
+ "id": "biblioref-target-in-bibliography-role-aria",
374
+ "dir": "biblioref-target-in-bibliography-role-aria",
375
+ "role": "biblioref",
376
+ "description": "A mid-sentence biblioref to a bibliography entry in the same document embeds the entry",
377
+ "files": {
378
+ "input": "input.html",
379
+ "gnd": "gnd.json"
380
+ }
381
+ },
382
+ {
383
+ "id": "biblioref-target-mixed-content",
384
+ "dir": "biblioref-target-mixed-content",
385
+ "role": "biblioref",
386
+ "description": "A biblioref to an inline entry mixing text and a link embeds both, not just the link",
387
+ "files": {
388
+ "input": "input.html",
389
+ "gnd": "gnd.json"
390
+ }
391
+ },
222
392
  {
223
393
  "id": "blockquote-html-native",
224
394
  "dir": "blockquote-html-native",
@@ -759,6 +929,26 @@
759
929
  "gnd": "gnd.json"
760
930
  }
761
931
  },
932
+ {
933
+ "id": "glossref-target-in-glossary-role-aria",
934
+ "dir": "glossref-target-in-glossary-role-aria",
935
+ "role": "glossref",
936
+ "description": "A mid-sentence glossref to a glossary term in the same document embeds the term's definition",
937
+ "files": {
938
+ "input": "input.html",
939
+ "gnd": "gnd.json"
940
+ }
941
+ },
942
+ {
943
+ "id": "glossref-target-percent-encoded",
944
+ "dir": "glossref-target-percent-encoded",
945
+ "role": "glossref",
946
+ "description": "A glossref whose href is percent-encoded still finds its target, and keeps its href as authored",
947
+ "files": {
948
+ "input": "input.html",
949
+ "gnd": "gnd.json"
950
+ }
951
+ },
762
952
  {
763
953
  "id": "header-html-native",
764
954
  "dir": "header-html-native",
@@ -1199,6 +1389,126 @@
1199
1389
  "gnd": "gnd.json"
1200
1390
  }
1201
1391
  },
1392
+ {
1393
+ "id": "noteref-after-closing-straight-quote",
1394
+ "dir": "noteref-after-closing-straight-quote",
1395
+ "role": "noteref",
1396
+ "description": "A closing straight quote before a noteref isn't taken for an opening one: both quoted words keep their quotes in plain text",
1397
+ "files": {
1398
+ "input": "input.html",
1399
+ "gnd": "gnd.json"
1400
+ }
1401
+ },
1402
+ {
1403
+ "id": "noteref-after-closing-straight-quote-split",
1404
+ "dir": "noteref-after-closing-straight-quote-split",
1405
+ "role": "noteref",
1406
+ "description": "A straight quote closing a quotation opened in a previous text object, as in fixed layouts, isn't taken for an opening one",
1407
+ "files": {
1408
+ "input": "input.html",
1409
+ "gnd": "gnd.json"
1410
+ }
1411
+ },
1412
+ {
1413
+ "id": "noteref-enclosed-across-formatting",
1414
+ "dir": "noteref-enclosed-across-formatting",
1415
+ "role": "noteref",
1416
+ "description": "Brackets left empty by a noteref are removed from plain text even when formatting splits them, as word processors often do",
1417
+ "files": {
1418
+ "input": "input.html",
1419
+ "gnd": "gnd.json"
1420
+ }
1421
+ },
1422
+ {
1423
+ "id": "noteref-enclosed-adjacent-pairs",
1424
+ "dir": "noteref-enclosed-adjacent-pairs",
1425
+ "role": "noteref",
1426
+ "description": "Adjacent brackets each left empty by a noteref are removed with the space between them, before punctuation or a word",
1427
+ "files": {
1428
+ "input": "input.html",
1429
+ "gnd": "gnd.json"
1430
+ }
1431
+ },
1432
+ {
1433
+ "id": "noteref-enclosed-adjacent-text",
1434
+ "dir": "noteref-enclosed-adjacent-text",
1435
+ "role": "noteref",
1436
+ "description": "Brackets left empty by a noteref are removed from plain text without adding a space the text didn't have",
1437
+ "files": {
1438
+ "input": "input.html",
1439
+ "gnd": "gnd.json"
1440
+ }
1441
+ },
1442
+ {
1443
+ "id": "noteref-enclosed-before-formatting",
1444
+ "dir": "noteref-enclosed-before-formatting",
1445
+ "role": "noteref",
1446
+ "description": "Brackets left empty by a noteref and directly followed by formatted text are removed from plain text without adding a space",
1447
+ "files": {
1448
+ "input": "input.html",
1449
+ "gnd": "gnd.json"
1450
+ }
1451
+ },
1452
+ {
1453
+ "id": "noteref-enclosed-guillemets-french",
1454
+ "dir": "noteref-enclosed-guillemets-french",
1455
+ "role": "noteref",
1456
+ "description": "French guillemets left empty by a noteref are removed with their inner spaces; neighbouring quotations, and the space before a closing guillemet, are kept",
1457
+ "files": {
1458
+ "input": "input.html",
1459
+ "gnd": "gnd.json"
1460
+ }
1461
+ },
1462
+ {
1463
+ "id": "noteref-enclosed-quotes-chinese",
1464
+ "dir": "noteref-enclosed-quotes-chinese",
1465
+ "role": "noteref",
1466
+ "description": "Chinese quotes left empty by a noteref are removed without any space",
1467
+ "files": {
1468
+ "input": "input.html",
1469
+ "gnd": "gnd.json"
1470
+ }
1471
+ },
1472
+ {
1473
+ "id": "noteref-enclosed-quotes-german",
1474
+ "dir": "noteref-enclosed-quotes-german",
1475
+ "role": "noteref",
1476
+ "description": "German „…“ and »…« left empty by a noteref are removed; quotations either side of one keep their space, in »…« and Swiss «…»",
1477
+ "files": {
1478
+ "input": "input.html",
1479
+ "gnd": "gnd.json"
1480
+ }
1481
+ },
1482
+ {
1483
+ "id": "noteref-enclosed-quotes-swedish",
1484
+ "dir": "noteref-enclosed-quotes-swedish",
1485
+ "role": "noteref",
1486
+ "description": "Swedish quotes, the same mark at both ends, left empty by a noteref are removed; quotations either side of one keep their space",
1487
+ "files": {
1488
+ "input": "input.html",
1489
+ "gnd": "gnd.json"
1490
+ }
1491
+ },
1492
+ {
1493
+ "id": "noteref-enclosed-straight-quotes",
1494
+ "dir": "noteref-enclosed-straight-quotes",
1495
+ "role": "noteref",
1496
+ "description": "Straight quotes left empty by a noteref are removed from plain text",
1497
+ "files": {
1498
+ "input": "input.html",
1499
+ "gnd": "gnd.json"
1500
+ }
1501
+ },
1502
+ {
1503
+ "id": "noteref-in-lone-block",
1504
+ "dir": "noteref-in-lone-block",
1505
+ "role": "noteref",
1506
+ "description": "A lone roleless block's text is kept alongside the noteref it embeds",
1507
+ "files": {
1508
+ "input": "input.html",
1509
+ "gnd": "gnd.json"
1510
+ }
1511
+ },
1202
1512
  {
1203
1513
  "id": "noteref-role-aria",
1204
1514
  "dir": "noteref-role-aria",
@@ -1229,6 +1539,26 @@
1229
1539
  "gnd": "gnd.json"
1230
1540
  }
1231
1541
  },
1542
+ {
1543
+ "id": "noteref-target-malformed-escape",
1544
+ "dir": "noteref-target-malformed-escape",
1545
+ "role": "noteref",
1546
+ "description": "A noteref whose href has a malformed percent-escape falls back to the fragment as written",
1547
+ "files": {
1548
+ "input": "input.html",
1549
+ "gnd": "gnd.json"
1550
+ }
1551
+ },
1552
+ {
1553
+ "id": "noteref-target-percent-encoded",
1554
+ "dir": "noteref-target-percent-encoded",
1555
+ "role": "noteref",
1556
+ "description": "A noteref whose href is percent-encoded still finds and embeds its footnote, which isn't output again at its own location",
1557
+ "files": {
1558
+ "input": "input.html",
1559
+ "gnd": "gnd.json"
1560
+ }
1561
+ },
1232
1562
  {
1233
1563
  "id": "notice-epub-type",
1234
1564
  "dir": "notice-epub-type",
@@ -0,0 +1,32 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "n",
5
+ "children": [
6
+ {
7
+ "role": [
8
+ "aside",
9
+ "footnote"
10
+ ],
11
+ "text": {
12
+ "plain": "Note."
13
+ }
14
+ }
15
+ ],
16
+ "role": [
17
+ "noteref"
18
+ ],
19
+ "text": {
20
+ "plain": "1"
21
+ }
22
+ }
23
+ ],
24
+ "role": [
25
+ "paragraph"
26
+ ],
27
+ "text": {
28
+ "plain": "He said \"hello\" \"next\"",
29
+ "ssml": "He said \"hello\"<readium:noteref id=\"n\" /> \"next\"",
30
+ "language": "en"
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ <p>He said "hello"<a role="doc-noteref" href="#n">1</a> "next"</p><aside id="n" role="doc-footnote">Note.</aside>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-after-closing-straight-quote",
3
+ "description": "A closing straight quote before a noteref isn't taken for an opening one: both quoted words keep their quotes in plain text",
4
+ "role": "noteref",
5
+ "rolesCovered": [
6
+ "noteref",
7
+ "footnote",
8
+ "aside",
9
+ "paragraph"
10
+ ],
11
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
12
+ "inputKind": "fragment"
13
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "text": {
5
+ "plain": "He said \"hello"
6
+ }
7
+ },
8
+ {
9
+ "children": [
10
+ {
11
+ "id": "n",
12
+ "children": [
13
+ {
14
+ "role": [
15
+ "aside",
16
+ "footnote"
17
+ ],
18
+ "text": {
19
+ "plain": "Note."
20
+ }
21
+ }
22
+ ],
23
+ "role": [
24
+ "noteref"
25
+ ],
26
+ "text": {
27
+ "plain": "1"
28
+ }
29
+ }
30
+ ],
31
+ "text": {
32
+ "plain": "world\" \"next\"",
33
+ "ssml": "world\"<readium:noteref id=\"n\" /> \"next\"",
34
+ "language": "en"
35
+ }
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1 @@
1
+ <div>He said "hello</div><div>world"<a role="doc-noteref" href="#n">1</a> "next"</div><aside id="n" role="doc-footnote">Note.</aside>
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "noteref-after-closing-straight-quote-split",
3
+ "description": "A straight quote closing a quotation opened in a previous text object, as in fixed layouts, isn't taken for an opening one",
4
+ "role": "noteref",
5
+ "rolesCovered": [
6
+ "noteref",
7
+ "footnote",
8
+ "aside"
9
+ ],
10
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
11
+ "inputKind": "fragment"
12
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "n",
5
+ "children": [
6
+ {
7
+ "role": [
8
+ "aside",
9
+ "footnote"
10
+ ],
11
+ "text": {
12
+ "plain": "Note."
13
+ }
14
+ }
15
+ ],
16
+ "role": [
17
+ "noteref"
18
+ ],
19
+ "text": {
20
+ "plain": "1"
21
+ }
22
+ }
23
+ ],
24
+ "role": [
25
+ "paragraph"
26
+ ],
27
+ "text": {
28
+ "plain": "Text after.",
29
+ "ssml": "Text (<readium:noteref id=\"n\" /> <emphasis>)</emphasis> after.",
30
+ "language": "en"
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ <p>Text (<a role="doc-noteref" href="#n">1</a> <em>)</em> after.</p><aside id="n" role="doc-footnote">Note.</aside>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-enclosed-across-formatting",
3
+ "description": "Brackets left empty by a noteref are removed from plain text even when formatting splits them, as word processors often do",
4
+ "role": "noteref",
5
+ "rolesCovered": [
6
+ "noteref",
7
+ "footnote",
8
+ "aside",
9
+ "paragraph"
10
+ ],
11
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
12
+ "inputKind": "fragment"
13
+ }
@@ -0,0 +1,108 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "children": [
5
+ {
6
+ "id": "n",
7
+ "children": [
8
+ {
9
+ "role": [
10
+ "aside",
11
+ "footnote"
12
+ ],
13
+ "text": {
14
+ "plain": "Note."
15
+ }
16
+ }
17
+ ],
18
+ "role": [
19
+ "noteref"
20
+ ],
21
+ "text": {
22
+ "plain": "1"
23
+ }
24
+ },
25
+ {
26
+ "id": "m",
27
+ "children": [
28
+ {
29
+ "role": [
30
+ "aside",
31
+ "footnote"
32
+ ],
33
+ "text": {
34
+ "plain": "Note."
35
+ }
36
+ }
37
+ ],
38
+ "role": [
39
+ "noteref"
40
+ ],
41
+ "text": {
42
+ "plain": "2"
43
+ }
44
+ }
45
+ ],
46
+ "role": [
47
+ "paragraph"
48
+ ],
49
+ "text": {
50
+ "plain": "Text, after.",
51
+ "ssml": "Text (<readium:noteref id=\"n\" />) (<readium:noteref id=\"m\" />), after.",
52
+ "language": "en"
53
+ }
54
+ },
55
+ {
56
+ "children": [
57
+ {
58
+ "id": "o",
59
+ "children": [
60
+ {
61
+ "role": [
62
+ "aside",
63
+ "footnote"
64
+ ],
65
+ "text": {
66
+ "plain": "Note."
67
+ }
68
+ }
69
+ ],
70
+ "role": [
71
+ "noteref"
72
+ ],
73
+ "text": {
74
+ "plain": "3"
75
+ }
76
+ },
77
+ {
78
+ "id": "p",
79
+ "children": [
80
+ {
81
+ "role": [
82
+ "aside",
83
+ "footnote"
84
+ ],
85
+ "text": {
86
+ "plain": "Note."
87
+ }
88
+ }
89
+ ],
90
+ "role": [
91
+ "noteref"
92
+ ],
93
+ "text": {
94
+ "plain": "4"
95
+ }
96
+ }
97
+ ],
98
+ "role": [
99
+ "paragraph"
100
+ ],
101
+ "text": {
102
+ "plain": "Text more.",
103
+ "ssml": "Text (<readium:noteref id=\"o\" />) (<readium:noteref id=\"p\" />) more.",
104
+ "language": "en"
105
+ }
106
+ }
107
+ ]
108
+ }
@@ -0,0 +1 @@
1
+ <p>Text (<a role="doc-noteref" href="#n">1</a>) (<a role="doc-noteref" href="#m">2</a>), after.</p><p>Text (<a role="doc-noteref" href="#o">3</a>) (<a role="doc-noteref" href="#p">4</a>) more.</p><aside id="n" role="doc-footnote">Note.</aside><aside id="m" role="doc-footnote">Note.</aside><aside id="o" role="doc-footnote">Note.</aside><aside id="p" role="doc-footnote">Note.</aside>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-enclosed-adjacent-pairs",
3
+ "description": "Adjacent brackets each left empty by a noteref are removed with the space between them, before punctuation or a word",
4
+ "role": "noteref",
5
+ "rolesCovered": [
6
+ "noteref",
7
+ "footnote",
8
+ "aside",
9
+ "paragraph"
10
+ ],
11
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
12
+ "inputKind": "fragment"
13
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "n",
5
+ "children": [
6
+ {
7
+ "role": [
8
+ "aside",
9
+ "footnote"
10
+ ],
11
+ "text": {
12
+ "plain": "注",
13
+ "language": "ja"
14
+ }
15
+ }
16
+ ],
17
+ "role": [
18
+ "noteref"
19
+ ],
20
+ "text": {
21
+ "plain": "1",
22
+ "language": "ja"
23
+ }
24
+ }
25
+ ],
26
+ "role": [
27
+ "paragraph"
28
+ ],
29
+ "text": {
30
+ "plain": "前後",
31
+ "ssml": "前(<readium:noteref id=\"n\" />)後",
32
+ "language": "ja"
33
+ }
34
+ }
@@ -0,0 +1 @@
1
+ <p lang="ja">前(<a role="doc-noteref" href="#n">1</a>)後</p><aside id="n" role="doc-footnote" lang="ja">注</aside>