forked from standardebooks/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix check for LoI text against either figcaption or alt text in s-041
And reword the corresponding lint message to indicate that alt is allowed.
- Loading branch information
Showing
6 changed files
with
204 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
s-004 [Error] chapter-1.xhtml `img` element missing `alt` attribute. | ||
<img> | ||
<img> | ||
s-041 [Manual Review] chapter-1.xhtml The text in `#f-5`'s LoI entry does not | ||
match either its `<figcaption>` element or its `<img>` `alt` attribute. | ||
s-041 [Manual Review] chapter-1.xhtml The text in `#f-6`'s LoI entry does not | ||
match either its `<figcaption>` element or its `<img>` `alt` attribute. | ||
s-041 [Manual Review] chapter-1.xhtml The text in `#f-7`'s LoI entry does not | ||
match either its `<figcaption>` element or its `<img>` `alt` attribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://www.idpf.org/2007/opf" dir="ltr" prefix="se: https://standardebooks.org/vocab/1.0" unique-identifier="uid" version="3.0" xml:lang="en-US"> | ||
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<dc:identifier id="uid">url:https://standardebooks.org/ebooks/jane-austen/unknown-novel/john-doe</dc:identifier> | ||
<dc:date>1900-01-01T00:00:00Z</dc:date> | ||
<meta property="dcterms:modified">1900-01-01T00:00:00Z</meta> | ||
<dc:rights>The source text and artwork in this ebook are believed to be in the United States public domain; that is, they are believed to be free of copyright restrictions in the United States. They may still be copyrighted in other countries, so users located outside of the United States must check their local laws before using this ebook. The creators of, and contributors to, this ebook dedicate their contributions to the worldwide public domain via the terms in the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).</dc:rights> | ||
<dc:publisher id="publisher">Standard Ebooks</dc:publisher> | ||
<meta property="file-as" refines="#publisher">Standard Ebooks</meta> | ||
<meta property="se:url.homepage" refines="#publisher">https://standardebooks.org</meta> | ||
<meta property="role" refines="#publisher" scheme="marc:relators">bkd</meta> | ||
<meta property="role" refines="#publisher" scheme="marc:relators">mdc</meta> | ||
<meta property="role" refines="#publisher" scheme="marc:relators">pbl</meta> | ||
<dc:contributor id="type-designer">The League of Moveable Type</dc:contributor> | ||
<meta property="file-as" refines="#type-designer">League of Moveable Type, The</meta> | ||
<meta property="se:url.homepage" refines="#type-designer">https://www.theleagueofmoveabletype.com</meta> | ||
<meta property="role" refines="#type-designer" scheme="marc:relators">tyd</meta> | ||
<link href="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa" rel="dcterms:conformsTo"/> | ||
<meta property="a11y:certifiedBy">Standard Ebooks</meta> | ||
<meta property="schema:accessMode">textual</meta> | ||
<meta property="schema:accessModeSufficient">textual</meta> | ||
<meta property="schema:accessibilityFeature">readingOrder</meta> | ||
<meta property="schema:accessibilityFeature">structuralNavigation</meta> | ||
<meta property="schema:accessibilityFeature">tableOfContents</meta> | ||
<meta property="schema:accessibilityFeature">unlocked</meta> | ||
<meta property="schema:accessibilityHazard">none</meta> | ||
<meta property="schema:accessibilitySummary">This publication conforms to WCAG 2.2 Level AA.</meta> | ||
<link href="onix.xml" media-type="application/xml" properties="onix" rel="record"/> | ||
<dc:title id="title">Unknown Novel</dc:title> | ||
<meta property="file-as" refines="#title">Unknown Novel</meta> | ||
<dc:subject id="subject-1">England--Social life and customs--19th century--Fiction</dc:subject> | ||
<dc:subject id="subject-2">Sisters -- Fiction</dc:subject> | ||
<meta property="authority" refines="#subject-1">LCSH</meta> | ||
<meta property="term" refines="#subject-1">sh2008114941</meta> | ||
<meta property="authority" refines="#subject-2">LCSH</meta> | ||
<meta property="term" refines="#subject-2">sh2008111400</meta> | ||
<meta property="se:subject">Fiction</meta> | ||
<dc:description id="description">A short test novel for lint testing.</dc:description> | ||
<meta id="long-description" property="se:long-description" refines="#description"> | ||
<p>A short test novel for lint testing.</p> | ||
</meta> | ||
<dc:language>en-GB</dc:language> | ||
<dc:source>https://www.gutenberg.org/ebooks/161</dc:source> | ||
<dc:source>https://archive.org/details/bub_gb_RtT0OLKFMHsC</dc:source> | ||
<meta property="se:word-count">WORD_COUNT</meta> | ||
<meta property="se:reading-ease.flesch">READING_EASE</meta> | ||
<meta property="se:url.encyclopedia.wikipedia">https://en.wikipedia.org/wiki/Unknown_Jane_Austen_Novel</meta> | ||
<meta property="se:url.vcs.github">https://github.com/standardebooks/jane-austen_unknown-novel_john-doe</meta> | ||
<dc:creator id="author">Jane Austen</dc:creator> | ||
<meta property="file-as" refines="#author">Austen, Jane</meta> | ||
<meta property="se:url.encyclopedia.wikipedia" refines="#author">https://en.wikipedia.org/wiki/Jane_Austen</meta> | ||
<meta property="se:url.authority.nacoaf" refines="#author">http://id.loc.gov/authorities/names/n79032879</meta> | ||
<meta property="role" refines="#author" scheme="marc:relators">aut</meta> | ||
<dc:contributor id="artist">Georg Friedrich Kersting</dc:contributor> | ||
<meta property="file-as" refines="#artist">Kersting, Georg Friedrich</meta> | ||
<meta property="se:url.encyclopedia.wikipedia" refines="#artist">https://en.wikipedia.org/wiki/Georg_Friedrich_Kersting</meta> | ||
<meta property="se:url.authority.nacoaf" refines="#artist">http://id.loc.gov/authorities/names/n83319941</meta> | ||
<meta property="role" refines="#artist" scheme="marc:relators">art</meta> | ||
<dc:contributor id="transcriber-1">Anonymous</dc:contributor> | ||
<meta property="file-as" refines="#transcriber-1">Anonymous</meta> | ||
<meta property="role" refines="#transcriber-1" scheme="marc:relators">trc</meta> | ||
<dc:contributor id="producer-1">John Doe</dc:contributor> | ||
<meta property="file-as" refines="#producer-1">Doe, John</meta> | ||
<meta property="role" refines="#producer-1" scheme="marc:relators">bkp</meta> | ||
<meta property="role" refines="#producer-1" scheme="marc:relators">blw</meta> | ||
<meta property="role" refines="#producer-1" scheme="marc:relators">cov</meta> | ||
<meta property="role" refines="#producer-1" scheme="marc:relators">ill</meta> | ||
<meta property="role" refines="#producer-1" scheme="marc:relators">mrk</meta> | ||
<meta property="role" refines="#producer-1" scheme="marc:relators">pfr</meta> | ||
<meta property="role" refines="#producer-1" scheme="marc:relators">tyg</meta> | ||
</metadata> | ||
<manifest> | ||
<item href="css/core.css" id="core.css" media-type="text/css"/> | ||
<item href="css/local.css" id="local.css" media-type="text/css"/> | ||
<item href="css/se.css" id="se.css" media-type="text/css"/> | ||
<item href="images/cover.svg" id="cover.svg" media-type="image/svg+xml" properties="cover-image"/> | ||
<item href="images/logo.svg" id="logo.svg" media-type="image/svg+xml"/> | ||
<item href="images/titlepage.svg" id="titlepage.svg" media-type="image/svg+xml"/> | ||
<item href="text/chapter-1.xhtml" id="chapter-1.xhtml" media-type="application/xhtml+xml"/> | ||
<item href="text/colophon.xhtml" id="colophon.xhtml" media-type="application/xhtml+xml" properties="svg"/> | ||
<item href="text/imprint.xhtml" id="imprint.xhtml" media-type="application/xhtml+xml" properties="svg"/> | ||
<item href="text/titlepage.xhtml" id="titlepage.xhtml" media-type="application/xhtml+xml" properties="svg"/> | ||
<item href="text/uncopyright.xhtml" id="uncopyright.xhtml" media-type="application/xhtml+xml"/> | ||
<item href="toc.xhtml" id="toc.xhtml" media-type="application/xhtml+xml" properties="nav"/> | ||
</manifest> | ||
<spine> | ||
<itemref idref="titlepage.xhtml"/> | ||
<itemref idref="imprint.xhtml"/> | ||
<itemref idref="chapter-1.xhtml"/> | ||
<itemref idref="colophon.xhtml"/> | ||
<itemref idref="uncopyright.xhtml"/> | ||
</spine> | ||
</package> |
21 changes: 21 additions & 0 deletions
21
tests/lint/semantic/s-041/in/src/epub/text/chapter-1.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/" xml:lang="en-GB"> | ||
<head> | ||
<title>I</title> | ||
</head> | ||
<body epub:type="bodymatter z3998:fiction"> | ||
<section id="chapter-1" epub:type="chapter"> | ||
<h2 epub:type="ordinal z3998:roman">I</h2> | ||
<figure id="f-1"><img alt="t-1-alt."/></figure> | ||
<!-- will cause s-004 to be emitted, but we are deliberately testing behavior with missing alt --> | ||
<figure id="f-2"><img/><figcaption>t-2-cap</figcaption></figure> | ||
<figure id="f-3"><img alt="t-3-alt."/><figcaption>t-3-cap</figcaption></figure> | ||
<figure id="f-4"><img alt="t-4-alt."/><figcaption>t-4-cap</figcaption></figure> | ||
|
||
<figure id="f-5"><img alt="t-5-alt."/></figure> | ||
<!-- will cause s-004 to be emitted, but we are deliberately testing behavior with missing alt --> | ||
<figure id="f-6"><img/><figcaption>t-6-cap</figcaption></figure> | ||
<figure id="f-7"><img alt="t-7-alt."/><figcaption>t-7-cap</figcaption></figure> | ||
</section> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: https://standardebooks.org/vocab/1.0" xml:lang="en-US"> | ||
<head> | ||
<title>Colophon</title> | ||
<link href="../css/core.css" rel="stylesheet" type="text/css"/> | ||
<link href="../css/se.css" rel="stylesheet" type="text/css"/> | ||
</head> | ||
<body epub:type="backmatter"> | ||
<section id="colophon" epub:type="colophon"> | ||
<header> | ||
<h2 epub:type="title">Colophon</h2> | ||
<img alt="The Standard Ebooks logo." src="../images/logo.svg" epub:type="z3998:publisher-logo se:image.color-depth.black-on-transparent"/> | ||
</header> | ||
<p><i epub:type="se:name.publication.book">Unknown Novel</i><br/> | ||
was published in 1810 by<br/> | ||
<a href="https://en.wikipedia.org/wiki/Jane_Austen">Jane Austen</a>.</p> | ||
<p>This ebook was produced for<br/> | ||
<a href="https://standardebooks.org">Standard Ebooks</a><br/> | ||
by<br/> | ||
<b>An Anonymous Volunteer</b>,<br/> | ||
and is based on a transcription produced in 2010 by<br/> | ||
<b class="name">An Anonymous Volunteer</b><br/> | ||
for<br/> | ||
<a href="https://www.gutenberg.org/ebooks/161">Project Gutenberg</a><br/> | ||
and is based on digital scans from the<br/> | ||
<a href="https://archive.org/details/bub_gb_RtT0OLKFMHsC">Internet Archive</a>.</p> | ||
<p>The cover page is adapted from<br/> | ||
<i epub:type="se:name.visual-art.painting">At the Mirror</i>,<br/> | ||
a painting completed in 1827 by<br/> | ||
<a href="https://en.wikipedia.org/wiki/Georg_Friedrich_Kersting">Georg Friedrich Kersting</a>.<br/> | ||
The cover and title pages feature the<br/> | ||
<b epub:type="se:name.visual-art.typeface">League Spartan</b> and <b epub:type="se:name.visual-art.typeface">Sorts Mill Goudy</b><br/> | ||
typefaces created in 2014 and 2009 by<br/> | ||
<a href="https://www.theleagueofmoveabletype.com">The League of Moveable Type</a>.</p> | ||
<p>The first edition of this ebook was released on<br/> | ||
<b>January 1, 1900, 12:00 <abbr class="eoc">a.m.</abbr></b><br/> | ||
You can check for updates to this ebook, view its revision history, or download it for different ereading systems at<br/> | ||
<a href="https://standardebooks.org/ebooks/jane-austen/unknown-novel/john-doe">standardebooks.org/ebooks/jane-austen/unknown-novel/john-doe</a>.</p> | ||
<p>The volunteer-driven Standard Ebooks project relies on readers like you to submit typos, corrections, and other improvements. Anyone can contribute at <a href="https://standardebooks.org">standardebooks.org</a>.</p> | ||
</section> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/" xml:lang="en-GB"> | ||
<head> | ||
<title>List of Illustrations</title> | ||
</head> | ||
<body epub:type="backmatter"> | ||
<nav id="loi" epub:type="loi"> | ||
<h2 epub:type="title">List of Illustrations</h2> | ||
<ol> | ||
<!-- text matches either alt or caption --> | ||
<li><p><a href="chapter-1.xhtml#f-1">t-1-alt.</a></p></li> | ||
<li><p><a href="chapter-1.xhtml#f-2">t-2-cap</a></p></li> | ||
<li><p><a href="chapter-1.xhtml#f-3">t-3-cap</a></p></li> | ||
<li><p><a href="chapter-1.xhtml#f-4">t-4-alt.</a></p></li> | ||
|
||
<!-- text matches neither alt nor caption --> | ||
<li><p><a href="chapter-1.xhtml#f-5">x</a></p></li> | ||
<li><p><a href="chapter-1.xhtml#f-6">x</a></p></li> | ||
<li><p><a href="chapter-1.xhtml#f-7">x</a></p></li> | ||
</ol> | ||
</nav> | ||
</body> | ||
</html> |