Skip to content

Commit

Permalink
printPageNumbers --> pageNavigation (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
chocolatkey authored Feb 1, 2025
1 parent 35b2fd9 commit f3dc16e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit f3dc16e

Please sign in to comment.