Add alt text to images in your PDFs using Firefox

Firefox Firefox Last updated: 1 week, 4 days ago 100% of users voted this helpful

Making your PDF files accessible is essential for ensuring that everyone, including those using screen readers, can fully engage with your content. Alt text provides crucial descriptions of images, helping users with screen readers and supporting individuals with cognitive disabilities. Unfortunately, alt text is often missing from PDFs.

Firefox makes it easy to add alt text to your PDFs. You can do it manually or use our experimental AI-powered feature to generate alt text automatically. You can add alt text when you insert an image or later. If you use AI-generated text, remember to review it for accuracy.

Add alt text manually

To include an image in your PDF and manually add alt text for accessibility, follow these steps:

  1. At the top right of the screen, click Add image to PDF 2.
  2. Click + Add image to open the file selection window.
  3. Browse and select the image file you want to add to the PDF.
  4. After adding the image, click + Alt text.
  5. In the provided space, either:
    • Write a concise description of the image for screen readers, or
    • Mark the image as decorative if it’s only for visual appeal.
  6. Click Save to insert the alt text.
  7. Drag and drop the image to your preferred location within the PDF.
  8. To resize the image, click and drag its borders until it reaches the desired size.
    Add image to PDF

To include an image in your PDF and manually add alt text for accessibility, follow these steps:

Note: These steps are part of an ongoing experiment and may not yet be available to all users. Some users will need to follow alternative steps (see below).
  1. Open a PDF in Firefox. Click the image icon Add image to PDF 2 at the top of the PDF viewer, then click Add image.
    Add image to PDF simplified
  2. Choose an image to add. Once the image is uploaded, you’ll see the alt text editor.
  3. Turn off Firefox android toggle off the toggle next to Create alt text automatically.
  4. Write the alt text from scratch in the text box.
  5. Click Save to add it to your image. If you click Not Now, any changes you made will be discarded.
    Turn off automatic alt text in PDFs
  6. You will see a confirmation message that your alt text was added.
    Alt text added
  7. If the image has no alt text, you will see a button that says Missing alt text. You can click this any time to add alt text to your image, which will make your document more accessible.
  8. If you deselect an image and it is still missing alt text, you will see an alert on the image (this will not appear in print view).
    • To remove this alert, click the image icon at the top of the PDF editor, then click the image, then click the Missing alt text button and follow the steps above.

Alternative steps

The above steps are part of an ongoing experiment. Some users may need to follow these alternative steps, to add alt text manually:

  1. At the top right of the screen, click Add image to PDF 2.
  2. Click + Add image to open the file selection window.
  3. Browse and select the image file you want to add to the PDF.
  4. After adding the image, click + Alt text.
  5. In the provided space, either:
    • Write a concise description of the image for screen readers, or
    • Mark the image as decorative if it’s only for visual appeal.
  6. Click Save to insert the alt text.
  7. Drag and drop the image to your preferred location within the PDF.
  8. To resize the image, click and drag its borders until it reaches the desired size.
    Add image to PDF

Add alt text automatically

Note: This experimental feature is being introduced gradually. It may not be available to you at this time.

About automatic alt text

Automatic alt text relies on the download of a small language AI model to your device. This allows the model to run directly on your device, so your images and data never leave your control and your privacy is always protected. Importantly, your personal data is never used to train the model; instead, the model is trained on a diverse set of open-source images. This way, you get useful alt text for your PDFs without giving up your privacy. Read more about our small language model, or learn about how we trained the model.

Use the automatic alt text feature

To include an image in your PDF and automatically add alt text for improved accessibility, follow these steps:

  1. Open a PDF in Firefox. Click the image icon Add image to PDF 2 at the top of the PDF viewer, then click Add image.
    Add image to PDF simplified
  2. Choose an image to add. Once the image is uploaded, you’ll see the alt text editor along with some automatically generated alt text based on your image. The generated text may take a few seconds to load the first time you use it.
  3. Review the automatically generated text and rewrite/edit as needed.
  4. Click Save to add the alt text to your image. If you click Not Now, any changes you made will be discarded and the original automatic alt text will be added to the image.
    Automatic alt text
  5. You will see a confirmation message that your alt text was added.
    Automatic alt text added
  6. If instead of Save you click Not Now, you may see a button that says Review alt text. This is because our automatic alt text should receive a human review to ensure quality. You can click Review alt text any time, and click Save after reviewing and editing the alt text as needed.
  7. If you deselect an image and the alt text still needs review, you will see an alert on the image (this will not appear in print view).
    • To remove this alert, click the image icon at the top of the PDF editor, then click the image, then click the Review alt text button and follow the steps above.

Image alt text settings

  1. Click the overflow menu of the PDF viewer, and select Image alt text settings.
    Image alt text settings
  2. From the settings panel, you can turn off automatic alt text and delete the alt text AI model from your device. Please note that having the AI model on your device is required to use automatic alt text.
  3. You can also change the alt text editor settings if you don’t want to see the alt text editor right away after adding an image. If you turn this off, you will still be able to access the alt text editor by clicking the image icon at the top of the PDF viewer, then selecting an image and clicking the alt text button.
    Alt text settings

Tips for writing alt text

Alt text should be a brief summary of the content of an image. Think about what is most important for your readers to understand about the image and how it relates to the rest of your PDF content. For in-depth tips on writing alt text, check out these resources:

Frequently asked questions

Is the automatic alt text accurate?

Our small language model is still a work in progress, and it will make mistakes, especially when describing complex images. This is why we designed the feature to:

  • Encourage human review so that our users can correct inaccuracies and include any missing details before saving the alt text.
  • Provide guardrails and notify screen reader users up front if alt text was automatically generated. This allows screen reader users to decide if they want to read or skip the description, with the understanding that automatic descriptions may be less accurate than descriptions written by a human.

To report issues with automatically generated content, please create tickets here.

Can automatic alt text generate overly descriptive or complex content?

Good alt text should be short and use simple words. That’s why we’ve trained our model to produce very brief descriptions that use plain language as much as possible.

Can the automatic alt text be too vague or miss key details?

Because we are aiming for short descriptions, it is possible for the text to be lacking in detail. This is why we encourage human review of all automatically generated alt text, so that our users can add the proper context and details as needed.

Is automatic alt text private?

Yes. The small language model that powers this feature is downloaded locally to your device. This means that your PDF and image content stays private on your device and is never sent to a remote server. The content of your PDF, image and alt text will never be viewable by Mozilla.

Is any PDF or image data used to train the alt text model?

No. None of your PDF or image data leaves your device, and your data will never be used to train the alt text model.

How do I turn off automatic alt text?

From the alt text editor, you can turn the Create alt text automatically toggle off to turn off the feature. Or, you can access image alt text settings from the PDF overflow menu and turn off the toggle from there. On this settings screen, you can also delete the model from your device.

How do I know when alt text is automatically generated?

When you see the text This alt text was created automatically below the text box on the alt text editor, you’ll know that the alt text was generated using our model.

Users who are reading the PDF outside of the Firefox editor will experience a disclaimer that comes before the alt text. This is so people reading the alt text with a screen reader or directly on the PDF can be informed that the alt text was not human-generated. For example: “Created automatically: [alt text description will go here]”.

If a user has manually edited the automatic alt text, the disclaimer will disappear.

Can I skip adding alt text?

Yes. After adding an image, you can click Not now on the alt text editor. This will discard any changes you have made to the alt text.

If you do this, you may see a button on the image that says Review alt text. This is because our automatic alt text should receive a human review to ensure quality. If the image doesn’t have any alt text, you will see a button that says Missing alt text. You can click this button at any time and click Save after reviewing, adding or editing the alt text as needed.

If you no longer wish to see the alt text editor after adding an image, open image alt text settings from the PDF overflow menu and turn off this setting.

Will alt text appear in a printed PDF?

No, alt text only appears on a digital PDF, where it can be viewed by hovering over the image or read by a screen reader.

Can automatic alt text generate biased, inappropriate or offensive content?

We’ve taken several steps to reduce the risk that the alt text model will generate biased, inappropriate or offensive content. These include programming the model not to use offensive language or assume race, ethnicity, religion, gender or health status of people depicted in an image.

Although good alt text conveys the meaning of an image and its content, the small language model that powers this feature cannot provide nuanced meaning or place the image in the appropriate historic or cultural content the way a human can. However, our model is designed to create a first draft of alt text that our users can edit as needed to convey the meaning of the image properly. By providing this starting point and encouraging human review, we are helping users produce alt text that meets established best practices more quickly.

Learn more about how we addressed bias while training the alt text model.

Related articles

Was this article helpful?

Please wait...

These fine people helped write this article:

Illustration of hands

Volunteer

Grow and share your expertise with others. Answer questions and improve our knowledge base.

Learn More