@readium/guided-navigation 1.1.2 → 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 (134) 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/dom.js +1 -1
  5. package/dist/elementHandlers.js +1 -1
  6. package/dist/emptyPairs.js +1 -0
  7. package/dist/language.js +1 -0
  8. package/dist/object.js +1 -1
  9. package/dist/prescan.js +1 -1
  10. package/dist/roles.js +1 -1
  11. package/dist/text.js +1 -1
  12. package/dist/textrefFragment.js +1 -1
  13. package/fixtures/ROLES_COVERAGE.md +5 -4
  14. package/fixtures/abbreviation-acronym-html-native/gnd.json +9 -0
  15. package/fixtures/abbreviation-acronym-html-native/input.html +1 -0
  16. package/fixtures/abbreviation-acronym-html-native/meta.json +11 -0
  17. package/fixtures/abbreviation-before-formatting/gnd.json +9 -0
  18. package/fixtures/abbreviation-before-formatting/input.html +1 -0
  19. package/fixtures/abbreviation-before-formatting/meta.json +11 -0
  20. package/fixtures/abbreviation-before-image/gnd.json +24 -0
  21. package/fixtures/abbreviation-before-image/input.html +1 -0
  22. package/fixtures/abbreviation-before-image/meta.json +12 -0
  23. package/fixtures/abbreviation-html-native/gnd.json +9 -0
  24. package/fixtures/abbreviation-html-native/input.html +1 -0
  25. package/fixtures/abbreviation-html-native/meta.json +11 -0
  26. package/fixtures/abbreviation-language/gnd.json +9 -0
  27. package/fixtures/abbreviation-language/input.html +1 -0
  28. package/fixtures/abbreviation-language/meta.json +11 -0
  29. package/fixtures/abbreviation-line-break/gnd.json +9 -0
  30. package/fixtures/abbreviation-line-break/input.html +1 -0
  31. package/fixtures/abbreviation-line-break/meta.json +11 -0
  32. package/fixtures/abbreviation-nested/gnd.json +9 -0
  33. package/fixtures/abbreviation-nested/input.html +1 -0
  34. package/fixtures/abbreviation-nested/meta.json +11 -0
  35. package/fixtures/abbreviation-nested-emphasis/gnd.json +9 -0
  36. package/fixtures/abbreviation-nested-emphasis/input.html +1 -0
  37. package/fixtures/abbreviation-nested-emphasis/meta.json +11 -0
  38. package/fixtures/abbreviation-nested-term/gnd.json +21 -0
  39. package/fixtures/abbreviation-nested-term/input.html +1 -0
  40. package/fixtures/abbreviation-nested-term/meta.json +12 -0
  41. package/fixtures/abbreviation-nested-term-punctuation/gnd.json +26 -0
  42. package/fixtures/abbreviation-nested-term-punctuation/input.html +1 -0
  43. package/fixtures/abbreviation-nested-term-punctuation/meta.json +12 -0
  44. package/fixtures/abbreviation-no-title/gnd.json +8 -0
  45. package/fixtures/abbreviation-no-title/input.html +1 -0
  46. package/fixtures/abbreviation-no-title/meta.json +11 -0
  47. package/fixtures/abbreviation-spanning-terms/gnd.json +33 -0
  48. package/fixtures/abbreviation-spanning-terms/input.html +1 -0
  49. package/fixtures/abbreviation-spanning-terms/meta.json +12 -0
  50. package/fixtures/abbreviation-with-image/gnd.json +24 -0
  51. package/fixtures/abbreviation-with-image/input.html +1 -0
  52. package/fixtures/abbreviation-with-image/meta.json +12 -0
  53. package/fixtures/abbreviation-with-svg-and-math/gnd.json +39 -0
  54. package/fixtures/abbreviation-with-svg-and-math/input.html +1 -0
  55. package/fixtures/abbreviation-with-svg-and-math/meta.json +13 -0
  56. package/fixtures/biblioref-target-descendant-ids/gnd.json +90 -0
  57. package/fixtures/biblioref-target-descendant-ids/input.html +1 -0
  58. package/fixtures/biblioref-target-descendant-ids/meta.json +14 -0
  59. package/fixtures/biblioref-target-in-bibliography-role-aria/gnd.json +59 -0
  60. package/fixtures/biblioref-target-in-bibliography-role-aria/input.html +6 -0
  61. package/fixtures/biblioref-target-in-bibliography-role-aria/meta.json +14 -0
  62. package/fixtures/biblioref-target-mixed-content/gnd.json +63 -0
  63. package/fixtures/biblioref-target-mixed-content/input.html +1 -0
  64. package/fixtures/biblioref-target-mixed-content/meta.json +11 -0
  65. package/fixtures/glossref-target-in-glossary-role-aria/gnd.json +76 -0
  66. package/fixtures/glossref-target-in-glossary-role-aria/input.html +5 -0
  67. package/fixtures/glossref-target-in-glossary-role-aria/meta.json +14 -0
  68. package/fixtures/glossref-target-percent-encoded/gnd.json +68 -0
  69. package/fixtures/glossref-target-percent-encoded/input.html +1 -0
  70. package/fixtures/glossref-target-percent-encoded/meta.json +14 -0
  71. package/fixtures/manifest.json +330 -0
  72. package/fixtures/noteref-after-closing-straight-quote/gnd.json +32 -0
  73. package/fixtures/noteref-after-closing-straight-quote/input.html +1 -0
  74. package/fixtures/noteref-after-closing-straight-quote/meta.json +13 -0
  75. package/fixtures/noteref-after-closing-straight-quote-split/gnd.json +38 -0
  76. package/fixtures/noteref-after-closing-straight-quote-split/input.html +1 -0
  77. package/fixtures/noteref-after-closing-straight-quote-split/meta.json +12 -0
  78. package/fixtures/noteref-enclosed-across-formatting/gnd.json +32 -0
  79. package/fixtures/noteref-enclosed-across-formatting/input.html +1 -0
  80. package/fixtures/noteref-enclosed-across-formatting/meta.json +13 -0
  81. package/fixtures/noteref-enclosed-adjacent-pairs/gnd.json +108 -0
  82. package/fixtures/noteref-enclosed-adjacent-pairs/input.html +1 -0
  83. package/fixtures/noteref-enclosed-adjacent-pairs/meta.json +13 -0
  84. package/fixtures/noteref-enclosed-adjacent-text/gnd.json +34 -0
  85. package/fixtures/noteref-enclosed-adjacent-text/input.html +1 -0
  86. package/fixtures/noteref-enclosed-adjacent-text/meta.json +13 -0
  87. package/fixtures/noteref-enclosed-before-formatting/gnd.json +34 -0
  88. package/fixtures/noteref-enclosed-before-formatting/input.html +1 -0
  89. package/fixtures/noteref-enclosed-before-formatting/meta.json +13 -0
  90. package/fixtures/noteref-enclosed-guillemets-french/gnd.json +103 -0
  91. package/fixtures/noteref-enclosed-guillemets-french/input.html +1 -0
  92. package/fixtures/noteref-enclosed-guillemets-french/meta.json +13 -0
  93. package/fixtures/noteref-enclosed-quotes-chinese/gnd.json +47 -0
  94. package/fixtures/noteref-enclosed-quotes-chinese/input.html +1 -0
  95. package/fixtures/noteref-enclosed-quotes-chinese/meta.json +13 -0
  96. package/fixtures/noteref-enclosed-quotes-german/gnd.json +124 -0
  97. package/fixtures/noteref-enclosed-quotes-german/input.html +1 -0
  98. package/fixtures/noteref-enclosed-quotes-german/meta.json +13 -0
  99. package/fixtures/noteref-enclosed-quotes-swedish/gnd.json +70 -0
  100. package/fixtures/noteref-enclosed-quotes-swedish/input.html +1 -0
  101. package/fixtures/noteref-enclosed-quotes-swedish/meta.json +13 -0
  102. package/fixtures/noteref-enclosed-straight-quotes/gnd.json +32 -0
  103. package/fixtures/noteref-enclosed-straight-quotes/input.html +1 -0
  104. package/fixtures/noteref-enclosed-straight-quotes/meta.json +13 -0
  105. package/fixtures/noteref-in-lone-block/gnd.json +29 -0
  106. package/fixtures/noteref-in-lone-block/input.html +1 -0
  107. package/fixtures/noteref-in-lone-block/meta.json +12 -0
  108. package/fixtures/noteref-target-malformed-escape/gnd.json +32 -0
  109. package/fixtures/noteref-target-malformed-escape/input.html +1 -0
  110. package/fixtures/noteref-target-malformed-escape/meta.json +13 -0
  111. package/fixtures/noteref-target-percent-encoded/gnd.json +32 -0
  112. package/fixtures/noteref-target-percent-encoded/input.html +1 -0
  113. package/fixtures/noteref-target-percent-encoded/meta.json +13 -0
  114. package/package.json +1 -1
  115. package/src/a11y.ts +50 -39
  116. package/src/converter.ts +140 -50
  117. package/src/dom.ts +0 -10
  118. package/src/elementHandlers.ts +76 -22
  119. package/src/emptyPairs.ts +74 -0
  120. package/src/language.ts +37 -0
  121. package/src/object.ts +11 -1
  122. package/src/prescan.ts +2 -1
  123. package/src/roles.ts +2 -0
  124. package/src/text.ts +5 -2
  125. package/src/textrefFragment.ts +9 -1
  126. package/types/src/a11y.d.ts +9 -4
  127. package/types/src/converter.d.ts +4 -0
  128. package/types/src/dom.d.ts +0 -1
  129. package/types/src/elementHandlers.d.ts +3 -2
  130. package/types/src/emptyPairs.d.ts +3 -0
  131. package/types/src/language.d.ts +4 -0
  132. package/types/src/object.d.ts +2 -0
  133. package/types/src/text.d.ts +2 -1
  134. package/types/src/textrefFragment.d.ts +4 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-enclosed-adjacent-text",
3
+ "description": "Brackets left empty by a noteref are removed from plain text without adding a space the text didn't have",
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\" />)<emphasis>後</emphasis>",
32
+ "language": "ja"
33
+ }
34
+ }
@@ -0,0 +1 @@
1
+ <p lang="ja">前(<a role="doc-noteref" href="#n">1</a>)<em>後</em></p><aside id="n" role="doc-footnote" lang="ja">注</aside>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-enclosed-before-formatting",
3
+ "description": "Brackets left empty by a noteref and directly followed by formatted text are removed from plain text without adding a space",
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,103 @@
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
+ "language": "fr"
24
+ }
25
+ }
26
+ ],
27
+ "role": [
28
+ "paragraph"
29
+ ],
30
+ "text": {
31
+ "plain": "Le mot ici.",
32
+ "ssml": "Le mot « <readium:noteref id=\"n\" /> » ici.",
33
+ "language": "fr"
34
+ }
35
+ },
36
+ {
37
+ "children": [
38
+ {
39
+ "id": "m",
40
+ "children": [
41
+ {
42
+ "role": [
43
+ "aside",
44
+ "footnote"
45
+ ],
46
+ "text": {
47
+ "plain": "Note."
48
+ }
49
+ }
50
+ ],
51
+ "role": [
52
+ "noteref"
53
+ ],
54
+ "text": {
55
+ "plain": "2",
56
+ "language": "fr"
57
+ }
58
+ }
59
+ ],
60
+ "role": [
61
+ "paragraph"
62
+ ],
63
+ "text": {
64
+ "plain": "Il dit « bonjour » « suite ».",
65
+ "ssml": "Il dit « bonjour » <readium:noteref id=\"m\" /> « suite ».",
66
+ "language": "fr"
67
+ }
68
+ },
69
+ {
70
+ "children": [
71
+ {
72
+ "id": "o",
73
+ "children": [
74
+ {
75
+ "role": [
76
+ "aside",
77
+ "footnote"
78
+ ],
79
+ "text": {
80
+ "plain": "Note."
81
+ }
82
+ }
83
+ ],
84
+ "role": [
85
+ "noteref"
86
+ ],
87
+ "text": {
88
+ "plain": "3",
89
+ "language": "fr"
90
+ }
91
+ }
92
+ ],
93
+ "role": [
94
+ "paragraph"
95
+ ],
96
+ "text": {
97
+ "plain": "Il dit « bonjour » et part.",
98
+ "ssml": "Il dit « bonjour <readium:noteref id=\"o\" /> » et part.",
99
+ "language": "fr"
100
+ }
101
+ }
102
+ ]
103
+ }
@@ -0,0 +1 @@
1
+ <div lang="fr"><p>Le mot « <a role="doc-noteref" href="#n">1</a> » ici.</p><p>Il dit « bonjour » <a role="doc-noteref" href="#m">2</a> « suite ».</p><p>Il dit « bonjour <a role="doc-noteref" href="#o">3</a> » et part.</p></div><aside id="n" role="doc-footnote">Note.</aside><aside id="m" role="doc-footnote">Note.</aside><aside id="o" role="doc-footnote">Note.</aside>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-enclosed-guillemets-french",
3
+ "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",
4
+ "role": "noteref",
5
+ "rolesCovered": [
6
+ "noteref",
7
+ "footnote",
8
+ "aside",
9
+ "paragraph"
10
+ ],
11
+ "sourceRef": "https://cldr.unicode.org/translation/characters/punctuation",
12
+ "inputKind": "fragment"
13
+ }
@@ -0,0 +1,47 @@
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
+ "language": "zh"
24
+ }
25
+ }
26
+ ],
27
+ "role": [
28
+ "paragraph"
29
+ ],
30
+ "text": {
31
+ "plain": "前后",
32
+ "ssml": "前“<readium:noteref id=\"n\" />”后",
33
+ "language": "zh"
34
+ }
35
+ },
36
+ {
37
+ "id": "m",
38
+ "role": [
39
+ "aside",
40
+ "footnote"
41
+ ],
42
+ "text": {
43
+ "plain": "Note."
44
+ }
45
+ }
46
+ ]
47
+ }
@@ -0,0 +1 @@
1
+ <p lang="zh">前“<a role="doc-noteref" href="#n">1</a>”后</p><aside id="n" role="doc-footnote">Note.</aside><aside id="m" role="doc-footnote">Note.</aside>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-enclosed-quotes-chinese",
3
+ "description": "Chinese quotes left empty by a noteref are removed without any space",
4
+ "role": "noteref",
5
+ "rolesCovered": [
6
+ "noteref",
7
+ "footnote",
8
+ "aside",
9
+ "paragraph"
10
+ ],
11
+ "sourceRef": "https://cldr.unicode.org/translation/characters/punctuation",
12
+ "inputKind": "fragment"
13
+ }
@@ -0,0 +1,124 @@
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
+ "language": "de"
24
+ }
25
+ },
26
+ {
27
+ "id": "m",
28
+ "children": [
29
+ {
30
+ "role": [
31
+ "aside",
32
+ "footnote"
33
+ ],
34
+ "text": {
35
+ "plain": "Note."
36
+ }
37
+ }
38
+ ],
39
+ "role": [
40
+ "noteref"
41
+ ],
42
+ "text": {
43
+ "plain": "2",
44
+ "language": "de"
45
+ }
46
+ }
47
+ ],
48
+ "role": [
49
+ "paragraph"
50
+ ],
51
+ "text": {
52
+ "plain": "Das Wort hier, dort.",
53
+ "ssml": "Das Wort „<readium:noteref id=\"n\" />“ hier, »<readium:noteref id=\"m\" />« dort.",
54
+ "language": "de"
55
+ }
56
+ },
57
+ {
58
+ "children": [
59
+ {
60
+ "id": "o",
61
+ "children": [
62
+ {
63
+ "role": [
64
+ "aside",
65
+ "footnote"
66
+ ],
67
+ "text": {
68
+ "plain": "Note."
69
+ }
70
+ }
71
+ ],
72
+ "role": [
73
+ "noteref"
74
+ ],
75
+ "text": {
76
+ "plain": "3",
77
+ "language": "de"
78
+ }
79
+ }
80
+ ],
81
+ "role": [
82
+ "paragraph"
83
+ ],
84
+ "text": {
85
+ "plain": "Er sagt «Hallo» «Welt».",
86
+ "ssml": "Er sagt «Hallo»<readium:noteref id=\"o\" /> «Welt».",
87
+ "language": "de"
88
+ }
89
+ },
90
+ {
91
+ "children": [
92
+ {
93
+ "id": "p",
94
+ "children": [
95
+ {
96
+ "role": [
97
+ "aside",
98
+ "footnote"
99
+ ],
100
+ "text": {
101
+ "plain": "Note."
102
+ }
103
+ }
104
+ ],
105
+ "role": [
106
+ "noteref"
107
+ ],
108
+ "text": {
109
+ "plain": "4",
110
+ "language": "de"
111
+ }
112
+ }
113
+ ],
114
+ "role": [
115
+ "paragraph"
116
+ ],
117
+ "text": {
118
+ "plain": "Er sagt »Hallo« »Welt«.",
119
+ "ssml": "Er sagt »Hallo«<readium:noteref id=\"p\" /> »Welt«.",
120
+ "language": "de"
121
+ }
122
+ }
123
+ ]
124
+ }
@@ -0,0 +1 @@
1
+ <div lang="de"><p>Das Wort „<a role="doc-noteref" href="#n">1</a>“ hier, »<a role="doc-noteref" href="#m">2</a>« dort.</p><p>Er sagt «Hallo»<a role="doc-noteref" href="#o">3</a> «Welt».</p><p>Er sagt »Hallo«<a role="doc-noteref" href="#p">4</a> »Welt«.</p></div><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-quotes-german",
3
+ "description": "German „…“ and »…« left empty by a noteref are removed; quotations either side of one keep their space, in »…« and Swiss «…»",
4
+ "role": "noteref",
5
+ "rolesCovered": [
6
+ "noteref",
7
+ "footnote",
8
+ "aside",
9
+ "paragraph"
10
+ ],
11
+ "sourceRef": "https://cldr.unicode.org/translation/characters/punctuation",
12
+ "inputKind": "fragment"
13
+ }
@@ -0,0 +1,70 @@
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
+ "language": "sv"
24
+ }
25
+ }
26
+ ],
27
+ "role": [
28
+ "paragraph"
29
+ ],
30
+ "text": {
31
+ "plain": "Ordet här.",
32
+ "ssml": "Ordet ”<readium:noteref id=\"n\" />” här.",
33
+ "language": "sv"
34
+ }
35
+ },
36
+ {
37
+ "children": [
38
+ {
39
+ "id": "m",
40
+ "children": [
41
+ {
42
+ "role": [
43
+ "aside",
44
+ "footnote"
45
+ ],
46
+ "text": {
47
+ "plain": "Note."
48
+ }
49
+ }
50
+ ],
51
+ "role": [
52
+ "noteref"
53
+ ],
54
+ "text": {
55
+ "plain": "2",
56
+ "language": "sv"
57
+ }
58
+ }
59
+ ],
60
+ "role": [
61
+ "paragraph"
62
+ ],
63
+ "text": {
64
+ "plain": "Han sa ”hej” ”nästa”.",
65
+ "ssml": "Han sa ”hej”<readium:noteref id=\"m\" /> ”nästa”.",
66
+ "language": "sv"
67
+ }
68
+ }
69
+ ]
70
+ }
@@ -0,0 +1 @@
1
+ <div lang="sv"><p>Ordet ”<a role="doc-noteref" href="#n">1</a>” här.</p><p>Han sa ”hej”<a role="doc-noteref" href="#m">2</a> ”nästa”.</p></div><aside id="n" role="doc-footnote">Note.</aside><aside id="m" role="doc-footnote">Note.</aside>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-enclosed-quotes-swedish",
3
+ "description": "Swedish quotes, the same mark at both ends, left empty by a noteref are removed; quotations either side of one keep their space",
4
+ "role": "noteref",
5
+ "rolesCovered": [
6
+ "noteref",
7
+ "footnote",
8
+ "aside",
9
+ "paragraph"
10
+ ],
11
+ "sourceRef": "https://cldr.unicode.org/translation/characters/punctuation",
12
+ "inputKind": "fragment"
13
+ }
@@ -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": "The word here.",
29
+ "ssml": "The word \"<readium:noteref id=\"n\" />\" here.",
30
+ "language": "en"
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ <p>The word "<a role="doc-noteref" href="#n">1</a>" here.</p><aside id="n" role="doc-footnote">Note.</aside>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-enclosed-straight-quotes",
3
+ "description": "Straight quotes left empty by a noteref are removed from 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,29 @@
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
+ "text": {
25
+ "plain": "Text here.",
26
+ "ssml": "Text \"<readium:noteref id=\"n\" />\" here.",
27
+ "language": "en"
28
+ }
29
+ }
@@ -0,0 +1 @@
1
+ <div>Text "<a role="doc-noteref" href="#n">1</a>" here.</div><aside id="n" role="doc-footnote">Note.</aside>
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "noteref-in-lone-block",
3
+ "description": "A lone roleless block's text is kept alongside the noteref it embeds",
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": "note%E0%A4",
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.",
29
+ "ssml": "Text<readium:noteref id=\"note%E0%A4\" />.",
30
+ "language": "en"
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ <p>Text<a role="doc-noteref" href="#note%E0%A4">1</a>.</p><aside id="note%E0%A4" role="doc-footnote">Note.</aside>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "noteref-target-malformed-escape",
3
+ "description": "A noteref whose href has a malformed percent-escape falls back to the fragment as written",
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,32 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "note-café",
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.",
29
+ "ssml": "Text<readium:noteref id=\"note-café\" />.",
30
+ "language": "en"
31
+ }
32
+ }
@@ -0,0 +1 @@
1
+ <p>Text<a role="doc-noteref" href="#note-caf%C3%A9">1</a>.</p><aside id="note-café" role="doc-footnote">Note.</aside>