Use Calibre to improve ePub accessibility

On this page:


Overview

Calibre is a free ePub reader that also has an ePub editor that allows you to edit the source code of ePub files. This can help you improve the accessibility of an ePub, such as adding or correcting alt text for images and headings. Because an ePub file is just a compressed ZIP file containing HTML and XML files, when editing the ePub, this is exactly what appears. If you have ever modified an HTML document before, this will be no different.

Open the file

To set things up for modifying the ePub files:

  1. Download and install Calibre.
  2. Open Calibre and select Add books in the upper left.
  3. Navigate to the ePub on your computer and select Open. The ePub will be added to the list in the main Calibre window.
  4. Right-click the ePub and select Edit book from the bottom of the menu. The "Edit book" tool should open.
  5. As instructed in the center column, double-click a file in the left column to open it.

Check for and insert image descriptions

Once you have opened a file with the edit tool, follow these steps to ensure the image descriptions are sufficient:

  1. Press Ctrl-f to bring up the find function.
  2. In the find field, type <img and select the Find button. You will be brought to the first instance of an image in the file or you will get an error message indicating there are no images in the file.
  3. For each image in the file, check that there is an alt= element at some point after img but before the closing >. Often, you will see alt="image", which is not sufficient.
  4. If there is an alt description that is not sufficient, place your description inside the quotation marks following alt=. You can also import alt text from Equidox.
  5. Save the file by clicking the floppy disk icon from the ribbon at the top. This will directly update the ePub file that you located on your computer and opened.

Check for and insert heading levels

Once you have opened a file with the edit tool, follow these steps to ensure the heading levels are accurate:

  1. Enlarge the file preview pane on the right so that you can see the heading levels clearly in context.
  2. Scroll through the document and click each heading you find or any text that you think should be a heading.
  3. Look in the center pane where the HTML for the text you selected will be brought into view. The beginning of this text should have <h followed by a number to indicate the heading level, or <p to indicate the text is a non-heading paragraph.
  4. If the text is not a heading or not the heading level you expect, in the file view, click anywhere within the text you wish to change. You do not have to select it.
  5. Press Ctrl and the heading level of your choice in order to change the HTML to that heading level. For example, press Ctrl-2 to change the text to a level 2 heading.
  6. If you follow these instructions and nothing seems to change, ensure that you did not click into the file preview pane, and that you did not select a group of text either in the file preview or file view pane. If you did, then the heading level you tried to add will have been added to all of the document's body text. To undo the mistake, click the undo button or use Ctrl-z, and within the file view pane, put your cursor inside the text you want to change.

Import tables from Equidox

You may find that you want to import tables from Equidox if they are not correct in the ePub you're working on. Once you have opened a file with the edit tool, to import a table:

  1. Navigate to your document on Equidox and open the page containing the table you need.
  2. If the table is not already formatted, do so in Equidox.
  3. Click preview this page. The preview will open in a new tab.
  4. From the preview tab, press Ctrl-u to view the HTML source code.
  5. Your table will be contained in a <table> tag. Locate it, and then copy everything from <table> to </table>.
  6. Paste the code into your ePub file where you want the table to appear. If an image of the table (using an <img> tag) or a different version of the table is already present, delete it before inserting the new table.

Import alt text from Equidox

You may find that you want to import alt text from Equidox. Once you have opened a file with the edit tool, to import alt text:

  1. Navigate to your document on Equidox and open the page containing the alt text you need.
  2. Click preview this page. The preview will open in a new tab.
  3. From the preview tab, press Ctrl-u to view the HTML source code.
  4. Locate the alt text you want (it should come after alt=).
  5. Copy the text and paste it into your ePub following the correct alt=.

This is document bgeh in the Knowledge Base.
Last modified on 2023-03-14 12:06:03.