From c22969130b6fb09659f92f878daf7b35989e6dde Mon Sep 17 00:00:00 2001 From: Hadrien Gardeur Date: Thu, 11 Jul 2024 11:41:38 +0200 Subject: [PATCH] Imported DPUB-ARIA roles into our schema --- README.md | 2 +- schema/object.schema.json | 4 +++- schema/roles.schema.json | 46 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 schema/roles.schema.json diff --git a/README.md b/README.md index 4403f05..b35d25b 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ A publication must include a [`duration`](https://r > As a starting point, we'll use [Digital Publishing WAI-ARIA Module 1.0]() along with HTML semantics. > For comics, we'll look into [EPUB Structural Semantics Vocabulary](https://www.w3.org/TR/epub-ssv-11/) as well, but it feels oddly too specific and not enough at the same time. -*For now this is a work in progress in a separate document: [List of roles](role.md)* +*For now this is a work in progress in a separate document: [List of roles](roles.md)* ## Appendix A - Examples diff --git a/schema/object.schema.json b/schema/object.schema.json index d2d7ea4..a9b0070 100644 --- a/schema/object.schema.json +++ b/schema/object.schema.json @@ -21,8 +21,10 @@ }, "role": { "type": ["string", "array"], + "$ref": "roles.schema.json", "items": { - "type": "string" + "type": "string", + "$ref": "roles.schema.json" } }, "children": { diff --git a/schema/roles.schema.json b/schema/roles.schema.json new file mode 100644 index 0000000..4b220ba --- /dev/null +++ b/schema/roles.schema.json @@ -0,0 +1,46 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://readium.org/guided-navigation/schema/roles.schema.json", + "title": "Readium Guided Navigation Roles", + "enum": [ + "abstract", + "acknowledgments", + "afterword", + "appendix", + "backlink", + "biblioentry", + "bibliography", + "biblioref", + "chapter", + "colophon", + "conclusion", + "cover", + "credit", + "credits", + "dedication", + "endnote", + "endnotes", + "epigraph", + "epilogue", + "errata", + "example", + "footnote", + "foreword", + "glossary", + "glossref", + "index", + "introduction", + "noteref", + "notice", + "pagebreak", + "pagelist", + "part", + "preface", + "prologue", + "pullquote", + "qna", + "subtitle", + "tip", + "toc" + ] +} \ No newline at end of file