Skip to content

Commit

Permalink
WIP: Full example for an accessible comic
Browse files Browse the repository at this point in the history
For now I'm focusing on roles, text and characters
  • Loading branch information
HadrienGardeur committed Aug 25, 2024
1 parent 17c5b74 commit 950e45d
Show file tree
Hide file tree
Showing 11 changed files with 285 additions and 12 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ Guided Navigation Documents <strong class="rfc">must</strong> be identified usin

### 1.2. Guided Navigation Object

Each Guided Navigation Object <strong class="rfc">must</strong> either contain:

- a `children` object containg at least one Guided Navigation Object
- or one or more of the following properties: `audioref`, `imgref` or `textref`

Guided Navigations Objects <strong class="rfc">should</strong> include one or more values for `role`.


| Name | Description | Format |
| ---- | ----------- | ------ |
Expand All @@ -62,10 +69,6 @@ Guided Navigation Documents <strong class="rfc">must</strong> be identified usin
| `text` | Textual equivalent of the resources or fragment of the resources referenced by the current Guided Navigation Object. | String |
| `textref` | References a textual resource or a fragment of it. | URI |

Each Guided Navigation Object <strong class="rfc">must</strong> either contain:

- a `children` object containg at least one Guided Navigation Object
- or one of the following elements: `audioref`, `imgref` or `textref`

## 2. Relationship to the Readium Web Publication Manifest

Expand Down Expand Up @@ -143,13 +146,17 @@ If this Guided Navigation Document contains any `audioref` element, then the Lin

> The following media fragments have been identified as potential candidates for fragments in `audioref`, `imgref` and `textref`:
>
>- Audio: <https://www.w3.org/TR/media-frags/#naming-time>
>- Images:
>**Audio**: <https://www.w3.org/TR/media-frags/#naming-time>
>
>**Images:**
>
> - Rectangular regions: <https://www.w3.org/TR/media-frags/#naming-space>
> - Polygonal regions: <https://idpf.org/epub/renditions/region-nav/#sec-3.5.1>
>- Text:
> - Fragment ID: `#identifier`
> - Text fragments: <https://wicg.github.io/scroll-to-text-fragment/>
>
>**Text:**
>
> - Fragment ID: `#identifier`
> - Text fragments: <https://wicg.github.io/scroll-to-text-fragment/>
>
> There are a number of open issues that relate to media fragments:
>
Expand All @@ -164,9 +171,6 @@ If this Guided Navigation Document contains any `audioref` element, then the Lin
> - Identifying skippable and escapable roles: <https://github.com/readium/guided-navigation/discussions/3>
> - Defining a list of roles for Divina: <https://github.com/readium/guided-navigation/discussions/1>

Each Guided Navigation Object <strong class="rfc">should</strong> document one or more role using the `role` property.

Roles are inherited from multiple specifications such as [HTML](https://html.spec.whatwg.org/), [ARIA](https://www.w3.org/TR/wai-aria-1.1/), [DPUB ARIA](https://www.w3.org/TR/dpub-aria-1.1/) and [EPUB 3 Semantics Vocabulary](https://www.w3.org/TR/epub-ssv-11/), in order to convey the structural semantics of a publication.

The full list of supported roles is available at: <https://readium.org/guided-navigation/roles>
Expand Down
182 changes: 182 additions & 0 deletions examples/Pepper & Carrot/guided.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
{
"guided": [
{
"imgref": "page1.jpg#xywh=76,19,814,635",
"role": ["panel"],
"character": ["Pepper", "Carrot", "Witch 1", "Witch 2", "Witch 3"]
},
{
"imgref": "page1.jpg#xywh=42,694,296,297",
"role": ["panel"],
"character": ["Witch 2"],
"children": [
{
"role": ["speechBubble"],
"text": "But Pepper… Come back…"
}
]
},
{
"imgref": "page1.jpg#xywh=356,695,584,296",
"role": ["panel"],
"character": ["Pepper"],
"children": [
{
"role": ["shoutBubble"],
"text": "No! I'm leaving!!"
},
{
"role": ["speechBubble"],
"text": "You don't teach real witchcraft! I'm going - to the witches of Ah!"
}
]
},
{
"imgref": "page1.jpg#xywh=43,1022,907,308",
"role": ["panel"],
"character": ["Pepper", "Carrot"]
},
{
"imgref": "page2.jpg.#xywh=58,16,878,305",
"role": ["panel"],
"character": ["Witch 1", "Witch 2", "Witch 3"]
},
{
"imgref": "page2.jpg.#xywh=43,355,906,347",
"role": ["panel"],
"character": ["Pepper", "Carrot"],
"children": [
{
"imgref": "page2.jpg#xywh=43,355,570,347",
"role": ["speechBubble"],
"character": ["Pepper"],
"text": "Alright then, off to the land of the setting moons. Shichimi can tell us how to join the witched of Ah."
},
{
"imgref": "page2.jpg#xywh=340,355,600,347",
"role": ["speechBubble"],
"character": ["Pepper"],
"text": "Carrot, get out the map and compass: it's too cloudy to see where I'm going"
}
]
},
{
"imgref": "page2.jpg#xywh=44,736,294,594",
"role": ["panel"],
"character": ["Carrot"]
},
{
"imgref": "page2.jpg#xywh=356,733,280,594",
"role": ["panel"],
"character": ["Pepper", "Carrot"],
"children": [
{
"role": ["shoutBubble"],
"character": ["Pepper"],
"text": "Drats! Turbulence! Hold on!"
}
]
},
{
"imgref": "page2.jpg#xywh=655,736,294,594",
"role": ["panel"],
"character": ["Pepper", "Carrot"],
"children": [
{
"role": ["shoutBubble"],
"character": ["Pepper"],
"text": "Oh no!!!"
}
]
},
{
"imgref": "page3.jpg#xywh=46,16,904,266",
"role": ["panel"]
},
{
"imgref": "page3.jpg#xywh=46,315,904,224",
"role": ["panel"]
},
{
"imgref": "page3.jpg#xywh=46,572,904,226",
"role": ["panel"]
},
{
"imgref": "page3.jpg#xywh=46,830,904,500",
"role": ["panel"]
},
{
"imgref": "page4.jpg#xywh=42,16,444,322",
"role": ["panel"]
},
{
"imgref": "page4.jpg#xywh=505,16,444,322",
"role": ["panel"]
},
{
"imgref": "page4.jpg#xywh=44,370,890,388",
"role": ["panel"]
},
{
"imgref": "page4.jpg#xywh=44,790,900,540",
"role": ["panel"],
"children": [
{
"imgref": "page4.jpg#xywh=246,794,512,348",
"role": ["speechBubble"]
},
{
"imgref": "page4.jpg#xywh=546,874,400,414",
"role": ["speechBubble"]
}
]
},
{
"imgref": "page5.jpg#xywh=42,14,908,290",
"role": ["panel"]
},
{
"imgref": "page5.jpg#xywh=45,336,455,510",
"role": ["panel"]
},
{
"imgref": "page5.jpg#xywh=520,336,430,510",
"role": ["panel"]
},
{
"imgref": "page5.jpg#xywh=164,916,706,414",
"role": ["panel"]
},
{
"imgref": "page6.jpg#xywh=84,30,840,402",
"role": ["panel"]
},
{
"imgref": "page6.jpg#xywh=44,490,228,392",
"role": ["panel"]
},
{
"imgref": "page6.jpg#xywh=294,490,642,392",
"role": ["panel"]
},
{
"imgref": "page6.jpg#xywh=44,912,400,416"
},
{
"imgref": "page6.jpg#xywh=44,912,906,416",
"role": ["panel"]
},
{
"imgref": "page7.jpg#xywh=40,15,914,422",
"role": ["panel"]
},
{
"imgref": "page7.jpg#xywh=256,450,540,210",
"role": ["panel"]
},
{
"imgref": "page7.jpg#xywh=42,692,886,638",
"role": ["panel"]
}
]
}
87 changes: 87 additions & 0 deletions examples/Pepper & Carrot/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"@context": "http://readium.org/webpub-manifest/context.jsonld",

"metadata": {
"title": "Pepper and Carrot - A Fresh Start",
"conformsTo": "https://readium.org/webpub-manifest/profiles/divina",
"@type": "http://schema.org/ComicStory",
"identifier": "https://www.peppercarrot.com/en/article377/episode-17-a-fresh-start",
"author": "David Revoy",
"translator": "Alex Gryson",
"language": "en",
"numberOfPages": 8,
"readingProgression": "ltr",
"published": "2016-06-30",
"belongsTo": {
"series": {
"name": "Pepper & Carrot",
"position": 17
}
}
},

"links": [
{
"rel": "self",
"href": "manifest.json",
"type": "application/divina+json"
},
{
"rel": "related",
"href": "guided.json",
"type": "application/guided-navigation+json"
}
],

"readingOrder": [
{
"rel":"cover",
"href": "page1.jpg",
"type": "image/jpeg",
"width": "992",
"height": "1373"
},
{
"href": "page2.jpg",
"type": "image/jpeg",
"width": "992",
"height": "1373"
},
{
"href": "page3.jpg",
"type": "image/jpeg",
"width": "992",
"height": "1373"
},
{
"href": "page4.jpg",
"type": "image/jpeg",
"width": "992",
"height": "1373"
},
{
"href": "page5.jpg",
"type": "image/jpeg",
"width": "992",
"height": "1373"
},
{
"href": "page6.jpg",
"type": "image/jpeg",
"width": "992",
"height": "1373"
},
{
"href": "page7.jpg",
"type": "image/jpeg",
"width": "992",
"height": "1373"
},
{
"href": "page8.jpg",
"type": "image/jpeg",
"width": "992",
"height": "1772"
}
]
}
Binary file added examples/Pepper & Carrot/page1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/Pepper & Carrot/page2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/Pepper & Carrot/page3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/Pepper & Carrot/page4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/Pepper & Carrot/page5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/Pepper & Carrot/page6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/Pepper & Carrot/page7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/Pepper & Carrot/page8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 950e45d

Please sign in to comment.