@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 @@
1
+ <p>The <abbr>WHO</abbr> said.</p>
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "abbreviation-no-title",
3
+ "description": "An abbr without a title has no expansion, so it stays plain text",
4
+ "role": "abbreviation",
5
+ "rolesCovered": [
6
+ "abbreviation",
7
+ "paragraph"
8
+ ],
9
+ "sourceRef": "https://www.w3.org/TR/speech-synthesis11/#S3.1.10",
10
+ "inputKind": "fragment"
11
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "role": [
3
+ "paragraph"
4
+ ],
5
+ "children": [
6
+ {
7
+ "role": [
8
+ "term"
9
+ ],
10
+ "text": {
11
+ "plain": "A"
12
+ }
13
+ },
14
+ {
15
+ "text": {
16
+ "plain": "and"
17
+ }
18
+ },
19
+ {
20
+ "role": [
21
+ "term"
22
+ ],
23
+ "text": {
24
+ "plain": "B"
25
+ }
26
+ },
27
+ {
28
+ "text": {
29
+ "plain": "."
30
+ }
31
+ }
32
+ ]
33
+ }
@@ -0,0 +1 @@
1
+ <p><abbr title="Alpha and Beta"><dfn>A</dfn> and <dfn>B</dfn>.</abbr></p>
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "abbreviation-spanning-terms",
3
+ "description": "An abbr spanning several terms isn't expanded, rather than repeated in each or spoken over the text between them",
4
+ "role": "abbreviation",
5
+ "rolesCovered": [
6
+ "abbreviation",
7
+ "term",
8
+ "paragraph"
9
+ ],
10
+ "sourceRef": "https://www.w3.org/TR/speech-synthesis11/#S3.1.10",
11
+ "inputKind": "fragment"
12
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "image1",
5
+ "imgref": "dot.png",
6
+ "role": [
7
+ "image"
8
+ ],
9
+ "description": {
10
+ "text": {
11
+ "plain": "dot"
12
+ }
13
+ }
14
+ }
15
+ ],
16
+ "role": [
17
+ "paragraph"
18
+ ],
19
+ "text": {
20
+ "plain": "The WHO said.",
21
+ "ssml": "The <sub alias=\"World Health Organization\">WHO</sub><readium:image id=\"image1\" /> said.",
22
+ "language": "en"
23
+ }
24
+ }
@@ -0,0 +1 @@
1
+ <p>The <abbr title="World Health Organization">W<img src="dot.png" alt="dot"/>HO</abbr> said.</p>
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "abbreviation-with-image",
3
+ "description": "An image inside an abbr doesn't split its expansion: one sub, followed by the image's placeholder",
4
+ "role": "abbreviation",
5
+ "rolesCovered": [
6
+ "abbreviation",
7
+ "image",
8
+ "paragraph"
9
+ ],
10
+ "sourceRef": "https://www.w3.org/TR/speech-synthesis11/#S3.1.10",
11
+ "inputKind": "fragment"
12
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "id": "image1",
5
+ "role": [
6
+ "image"
7
+ ],
8
+ "textref": "#css(svg)",
9
+ "description": {
10
+ "text": {
11
+ "plain": "dot"
12
+ }
13
+ }
14
+ },
15
+ {
16
+ "id": "math1",
17
+ "role": [
18
+ "math"
19
+ ],
20
+ "text": {
21
+ "ssml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" alttext=\"c\"><mi>c</mi></math>"
22
+ },
23
+ "textref": "#css(math)",
24
+ "description": {
25
+ "text": {
26
+ "plain": "c"
27
+ }
28
+ }
29
+ }
30
+ ],
31
+ "role": [
32
+ "paragraph"
33
+ ],
34
+ "text": {
35
+ "plain": "The WHO and OED said.",
36
+ "ssml": "The <sub alias=\"World Health Organization\">WHO</sub><readium:image id=\"image1\" /> and <sub alias=\"Organisation for Economic Co-operation and Development\">OED</sub><readium:math id=\"math1\" /> said.",
37
+ "language": "en"
38
+ }
39
+ }
@@ -0,0 +1 @@
1
+ <p>The <abbr title="World Health Organization">W<svg aria-label="dot"></svg>HO</abbr> and <abbr title="Organisation for Economic Co-operation and Development">OE<math alttext="c"><mi>c</mi></math>D</abbr> said.</p>
@@ -0,0 +1,13 @@
1
+ {
2
+ "id": "abbreviation-with-svg-and-math",
3
+ "description": "An SVG image or math inside an abbr doesn't split its expansion: one sub, followed by the object's placeholder",
4
+ "role": "abbreviation",
5
+ "rolesCovered": [
6
+ "abbreviation",
7
+ "image",
8
+ "math",
9
+ "paragraph"
10
+ ],
11
+ "sourceRef": "https://www.w3.org/TR/speech-synthesis11/#S3.1.10",
12
+ "inputKind": "fragment"
13
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "children": [
5
+ {
6
+ "id": "biblioref1",
7
+ "children": [
8
+ {
9
+ "children": [
10
+ {
11
+ "children": [
12
+ {
13
+ "id": "link1",
14
+ "text": {
15
+ "plain": "book"
16
+ },
17
+ "textref": "book.html"
18
+ }
19
+ ],
20
+ "role": [
21
+ "paragraph"
22
+ ],
23
+ "text": {
24
+ "plain": "Entry.",
25
+ "ssml": "Entry <readium:link id=\"link1\" />.",
26
+ "language": "en"
27
+ }
28
+ }
29
+ ],
30
+ "role": [
31
+ "listItem"
32
+ ]
33
+ }
34
+ ],
35
+ "role": [
36
+ "biblioref"
37
+ ],
38
+ "text": {
39
+ "plain": "1"
40
+ },
41
+ "textref": "#entry"
42
+ }
43
+ ],
44
+ "role": [
45
+ "paragraph"
46
+ ],
47
+ "text": {
48
+ "plain": "See.",
49
+ "ssml": "See <readium:biblioref id=\"biblioref1\" />.",
50
+ "language": "en"
51
+ }
52
+ },
53
+ {
54
+ "children": [
55
+ {
56
+ "id": "entry",
57
+ "children": [
58
+ {
59
+ "id": "details",
60
+ "children": [
61
+ {
62
+ "id": "lnk",
63
+ "text": {
64
+ "plain": "book"
65
+ },
66
+ "textref": "book.html"
67
+ }
68
+ ],
69
+ "role": [
70
+ "paragraph"
71
+ ],
72
+ "text": {
73
+ "plain": "Entry.",
74
+ "ssml": "Entry <readium:link id=\"lnk\" />.",
75
+ "language": "en"
76
+ }
77
+ }
78
+ ],
79
+ "role": [
80
+ "listItem"
81
+ ]
82
+ }
83
+ ],
84
+ "role": [
85
+ "list",
86
+ "bibliography"
87
+ ]
88
+ }
89
+ ]
90
+ }
@@ -0,0 +1 @@
1
+ <p>See <a role="doc-biblioref" href="#entry">1</a>.</p><ul role="doc-bibliography"><li id="entry"><p id="details">Entry <a id="lnk" href="book.html">book</a>.</p></li></ul>
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "biblioref-target-descendant-ids",
3
+ "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",
4
+ "role": "biblioref",
5
+ "rolesCovered": [
6
+ "biblioref",
7
+ "bibliography",
8
+ "list",
9
+ "listItem",
10
+ "paragraph"
11
+ ],
12
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
13
+ "inputKind": "fragment"
14
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "children": [
5
+ {
6
+ "id": "biblioref1",
7
+ "children": [
8
+ {
9
+ "role": [
10
+ "listItem"
11
+ ],
12
+ "text": {
13
+ "plain": "Smith, J. Lighthouses of the Atlantic. 1988."
14
+ }
15
+ }
16
+ ],
17
+ "role": [
18
+ "biblioref"
19
+ ],
20
+ "text": {
21
+ "plain": "Smith, 1988"
22
+ },
23
+ "textref": "#smith1988"
24
+ }
25
+ ],
26
+ "role": [
27
+ "paragraph"
28
+ ],
29
+ "text": {
30
+ "plain": "Lighthouses were first electrified in the 1870s along the coast.",
31
+ "ssml": "Lighthouses were first electrified in the 1870s (<readium:biblioref id=\"biblioref1\" />) along the coast.",
32
+ "language": "en"
33
+ }
34
+ },
35
+ {
36
+ "children": [
37
+ {
38
+ "children": [
39
+ {
40
+ "id": "smith1988",
41
+ "role": [
42
+ "listItem"
43
+ ],
44
+ "text": {
45
+ "plain": "Smith, J. Lighthouses of the Atlantic. 1988."
46
+ }
47
+ }
48
+ ],
49
+ "role": [
50
+ "list"
51
+ ]
52
+ }
53
+ ],
54
+ "role": [
55
+ "bibliography"
56
+ ]
57
+ }
58
+ ]
59
+ }
@@ -0,0 +1,6 @@
1
+ <p>Lighthouses were first electrified in the 1870s (<a href="#smith1988" role="doc-biblioref">Smith, 1988</a>) along the coast.</p>
2
+ <div role="doc-bibliography">
3
+ <ul>
4
+ <li id="smith1988">Smith, J. Lighthouses of the Atlantic. 1988.</li>
5
+ </ul>
6
+ </div>
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "biblioref-target-in-bibliography-role-aria",
3
+ "description": "A mid-sentence biblioref to a bibliography entry in the same document embeds the entry",
4
+ "role": "biblioref",
5
+ "rolesCovered": [
6
+ "bibliography",
7
+ "biblioref",
8
+ "list",
9
+ "listItem",
10
+ "paragraph"
11
+ ],
12
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
13
+ "inputKind": "fragment"
14
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "children": [
5
+ {
6
+ "id": "biblioref1",
7
+ "children": [
8
+ {
9
+ "children": [
10
+ {
11
+ "id": "link1",
12
+ "text": {
13
+ "plain": "Title"
14
+ },
15
+ "textref": "book.html"
16
+ }
17
+ ],
18
+ "text": {
19
+ "plain": "Author. Year",
20
+ "ssml": "Author <readium:link id=\"link1\" />. Year",
21
+ "language": "en"
22
+ }
23
+ }
24
+ ],
25
+ "role": [
26
+ "biblioref"
27
+ ],
28
+ "text": {
29
+ "plain": "1"
30
+ },
31
+ "textref": "#entry"
32
+ }
33
+ ],
34
+ "role": [
35
+ "paragraph"
36
+ ],
37
+ "text": {
38
+ "plain": "See.",
39
+ "ssml": "See <readium:biblioref id=\"biblioref1\" />.",
40
+ "language": "en"
41
+ }
42
+ },
43
+ {
44
+ "children": [
45
+ {
46
+ "id": "link2",
47
+ "text": {
48
+ "plain": "Title"
49
+ },
50
+ "textref": "book.html"
51
+ }
52
+ ],
53
+ "role": [
54
+ "paragraph"
55
+ ],
56
+ "text": {
57
+ "plain": "Author. Year",
58
+ "ssml": "Author <readium:link id=\"link2\" />. Year",
59
+ "language": "en"
60
+ }
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1 @@
1
+ <p>See <a role="doc-biblioref" href="#entry">1</a>.</p><p><span id="entry">Author <a href="book.html">Title</a>. Year</span></p>
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "biblioref-target-mixed-content",
3
+ "description": "A biblioref to an inline entry mixing text and a link embeds both, not just the link",
4
+ "role": "biblioref",
5
+ "rolesCovered": [
6
+ "biblioref",
7
+ "paragraph"
8
+ ],
9
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
10
+ "inputKind": "fragment"
11
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "children": [
5
+ {
6
+ "id": "glossref1",
7
+ "children": [
8
+ {
9
+ "children": [
10
+ {
11
+ "role": [
12
+ "term"
13
+ ],
14
+ "text": {
15
+ "plain": "Fresnel lens"
16
+ }
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "role": [
22
+ "definition"
23
+ ],
24
+ "text": {
25
+ "plain": "A compact lens for focusing light."
26
+ }
27
+ }
28
+ ],
29
+ "role": [
30
+ "glossref"
31
+ ],
32
+ "text": {
33
+ "plain": "Fresnel lens"
34
+ },
35
+ "textref": "#fresnel-lens"
36
+ }
37
+ ],
38
+ "role": [
39
+ "paragraph"
40
+ ],
41
+ "text": {
42
+ "plain": "The light passes through a at the top.",
43
+ "ssml": "The light passes through a <readium:glossref id=\"glossref1\" /> at the top.",
44
+ "language": "en"
45
+ }
46
+ },
47
+ {
48
+ "children": [
49
+ {
50
+ "id": "fresnel-lens",
51
+ "children": [
52
+ {
53
+ "role": [
54
+ "term"
55
+ ],
56
+ "text": {
57
+ "plain": "Fresnel lens"
58
+ }
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "role": [
64
+ "definition"
65
+ ],
66
+ "text": {
67
+ "plain": "A compact lens for focusing light."
68
+ }
69
+ }
70
+ ],
71
+ "role": [
72
+ "glossary"
73
+ ]
74
+ }
75
+ ]
76
+ }
@@ -0,0 +1,5 @@
1
+ <p>The light passes through a <a href="#fresnel-lens" role="doc-glossref">Fresnel lens</a> at the top.</p>
2
+ <dl role="doc-glossary">
3
+ <dt id="fresnel-lens"><dfn>Fresnel lens</dfn></dt>
4
+ <dd>A compact lens for focusing light.</dd>
5
+ </dl>
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "glossref-target-in-glossary-role-aria",
3
+ "description": "A mid-sentence glossref to a glossary term in the same document embeds the term's definition",
4
+ "role": "glossref",
5
+ "rolesCovered": [
6
+ "glossary",
7
+ "glossref",
8
+ "paragraph",
9
+ "term",
10
+ "definition"
11
+ ],
12
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
13
+ "inputKind": "fragment"
14
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "children": [
3
+ {
4
+ "children": [
5
+ {
6
+ "id": "glossref1",
7
+ "children": [
8
+ {
9
+ "role": [
10
+ "term"
11
+ ],
12
+ "text": {
13
+ "plain": "café"
14
+ }
15
+ },
16
+ {
17
+ "role": [
18
+ "definition"
19
+ ],
20
+ "text": {
21
+ "plain": "A coffee shop."
22
+ }
23
+ }
24
+ ],
25
+ "role": [
26
+ "glossref"
27
+ ],
28
+ "text": {
29
+ "plain": "café"
30
+ },
31
+ "textref": "#caf%C3%A9"
32
+ }
33
+ ],
34
+ "role": [
35
+ "paragraph"
36
+ ],
37
+ "text": {
38
+ "plain": "A nearby.",
39
+ "ssml": "A <readium:glossref id=\"glossref1\" /> nearby.",
40
+ "language": "en"
41
+ }
42
+ },
43
+ {
44
+ "children": [
45
+ {
46
+ "id": "café",
47
+ "role": [
48
+ "term"
49
+ ],
50
+ "text": {
51
+ "plain": "café"
52
+ }
53
+ },
54
+ {
55
+ "role": [
56
+ "definition"
57
+ ],
58
+ "text": {
59
+ "plain": "A coffee shop."
60
+ }
61
+ }
62
+ ],
63
+ "role": [
64
+ "glossary"
65
+ ]
66
+ }
67
+ ]
68
+ }
@@ -0,0 +1 @@
1
+ <p>A <a role="doc-glossref" href="#caf%C3%A9">café</a> nearby.</p><dl role="doc-glossary"><dt id="café">café</dt><dd>A coffee shop.</dd></dl>
@@ -0,0 +1,14 @@
1
+ {
2
+ "id": "glossref-target-percent-encoded",
3
+ "description": "A glossref whose href is percent-encoded still finds its target, and keeps its href as authored",
4
+ "role": "glossref",
5
+ "rolesCovered": [
6
+ "glossref",
7
+ "glossary",
8
+ "term",
9
+ "definition",
10
+ "paragraph"
11
+ ],
12
+ "sourceRef": "https://github.com/readium/guided-navigation/blob/main/roles.md",
13
+ "inputKind": "fragment"
14
+ }