Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/manifest/a11y.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ const (
// The work includes an index to the content.
A11yFeatureIndex A11yFeature = "index"

// The work includes equivalent print page numbers. This setting is most commonly used
// with ebooks for which there is a print equivalent.
A11yFeaturePrintPageNumbers A11yFeature = "printPageNumbers"
// The resource includes a means of navigating to static page break locations.
// The most common way of providing page navigation in digital publications is through a page list.
A11yFeaturePageNavigation A11yFeature = "pageNavigation"

// The reading order of the content is clearly defined in the markup
// (e.g., figures, sidebars and other secondary content has been marked up to allow it
Expand Down
4 changes: 2 additions & 2 deletions pkg/streamer/a11y_infer.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ func inferA11yMetadataFromManifest(mf manifest.Manifest) *manifest.A11y {
}
}

if mf.TableOfContents != nil && len(mf.TableOfContents) > 0 {
if len(mf.TableOfContents) > 0 {
addFeature(manifest.A11yFeatureTableOfContents)
}

if mf.ConformsTo(manifest.ProfileEPUB) {
if _, hasPageList := mf.Subcollections["pageList"]; hasPageList {
addFeature(manifest.A11yFeaturePrintPageNumbers)
addFeature(manifest.A11yFeaturePageNavigation)
}

for _, link := range allResources {
Expand Down
2 changes: 1 addition & 1 deletion pkg/streamer/a11y_infer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func TestInferFeaturePageList(t *testing.T) {
},
ReadingOrder: []manifest.Link{newLink(mediatype.HTML, "html")},
}
assertFeature(t, m, manifest.A11yFeaturePrintPageNumbers)
assertFeature(t, m, manifest.A11yFeaturePageNavigation)
}

// If the publication contains any resource with MathML (check for the presence
Expand Down