Accessible Publishing Knowledge Base

Page Numbers

Summary

If a publication has a statically-paginated equivalent, including page numbers allows users to coordinate locations.

Techniques

Examples

Example 1 — Page break marker
<p>
   …
   <span
       role="doc-pagebreak"
       id="pg24"
       aria-label="24"/>
   …
</p>
Example 2 — Declaring source in EPUB package document
<package…>
   …
   <metadata
     xmlns:dc="http://purl.org/dc/elements/1.1/">
     …
     <dc:source id="id">
       urn:isbn:9780375704024
     </dc:source>
   </metadata>
</package>

Explanation

If a digital publication is produced from the same workflow as a print document, print pagination markers should be retained. These markers benefit users in mixed print/digital environments, such as a classroom, as the page numbers allow a common point of reference between the two editions.

Page break locations can be added to the markup using span and div tags with an role attribute set to the value doc-pagebreak. An id attribute must be attached to each element containing a page number to enable linking to the breaks.

When including page numbers, a page list should also be included to faciliate navigation. The page list is used to find the location of page breaks.

EPUB 3

When including print page references, the EPUB 3 package document metadata should also include a dc:source element identifying the print source.

Samples

The EPUB Samples Project contains the following publications that include print page numbering:

References

Frequently Asked Questions

Does the page number reflect the page that is ending or the page that is starting?

The page number always reflects the page that is starting.

Does the page break marker placement follow the print position?

No, page break markers are always placed at the start of the page's content, regardless of whether the page number is printed at the top or bottom of the page in the print edition. When a user jumps to a specific page, they want to jump to the start of the content for that page, not the end.

Should I include the page numbers as content or empty elements?

There are pros and cons to each approach.

If you include the page numbers as text content within a span or div, the pages will be more easily accessible to both sighted users and users using assistive technologies. This method has been employed in previous DAISY standards. The potential downside, however, is that mainstream reading systems will not provide equivalent functionality to turn off unwanted content, forcing users to view the page numbers. Additionally, current assistive technologies may not provide content filtering on the epub:type attribute, also interfering with reading.

Page numbers as empty elements are the more traditional mainstream approach, with anchor tags having served this function in the past. Using the title attribute on an empty element, however, potentially complicates the rendering/announcing of the pages. Page numbers that mix alphanumeric characters, for example, could not include both visual and aural alternatives.

Why is the page-list nav necessary?

Although the page-list nav provides users a way to manually look up pages, it is primarily intended to facilitate quick-access through the reading system. To implement a feature that can jump a user to a specific page that they voice or type in, reading system need to be able to map the location quickly without having to randomly load and scan content files. The page-list nav is how these lookups occur.

Where do I put a page number when the page break occurs in the middle of a list?

List often break across pages, with one item ending at the bottom of one and a new item starting at the top of the next. In these cases, it's not possible to locate the page number between the two list items, as it's not valid for a list to contain anything but list items.

The obvious solutions are to either insert the page number as the very last element in the item that ends the page:

<li>….<span
	  epub:type="pagebreak"
	 
	  title="24"/></li>
   <li>…</li>

or to place it as the very first element in the list item that starts the page

<li>….</li>
   <li><span
	  epub:type="pagebreak"
	 
	  title="24"/>…</li>

Best practice at this time is to place the page break inside the concluding element, but both methods are acceptable. When included in the trailing list item, an assistive technology should announce the new list item that starts the next page to the user, whereas if the page number starts the list item the user may not be made aware they are in a list until reaching the next item.

One practice to avoid is creating a new list item just for the page break. As page breaks are often not visible content, an empty list item will be confusing to all users.

Can I use a tags for page numbers?

The a element has two specific uses defined in HTML5: for links when the href attribute is present, and for placeholder links when it is not (e.g., a link that might be active in another context or after some interaction by the user). As page breaks are not links, and are never intended to be activated as links, it is semantically incorrect to use them for page breaks.