/ โ† Accessibility Fixes / Alt text not showing on hover
In this guide
  1. Why alt text does not appear on hover
  2. Where hover text really comes from
  3. How to check your alt text is really there
  4. When you want visitors to see a description
  5. Removing title attributes that copy the alt
  6. A worked example
  7. The fix, step by step
  8. Edge cases worth knowing
  9. Keeping it right
  10. Questions and answers

Why alt text does not appear on hover

The alt attribute provides a text alternative for an image. It has three audiences, and none of them is a sighted visitor looking at a loaded image:

When the image loads normally, the alt text has done its job silently. No current browser, whether Chrome, Edge, Firefox or Safari, shows it on hover, and that is the correct behaviour defined by HTML. Nothing on your site is broken.

The memory of alt tooltips comes from old versions of Internet Explorer, which displayed alt text as a tooltip when an image had no title. Many people learned web editing at that time, and the habit of checking alt text by hovering has outlived the browser. Later versions of Internet Explorer dropped the behaviour in standards mode, and no modern browser copied it.

๐Ÿ’ก If a support request says the alt text is not working, ask how it was tested. If the answer is by hovering, the alt text is very likely fine.

Where hover text really comes from

The small box that appears when you rest the mouse on an image, a link or a word is the browser's tooltip for the title attribute. Any element can have one:

<img src="/images/bathroom.webp" alt="Finished bathroom with walk-in shower"
     title="Bathroom refit, March 2026" width="1200" height="800">

If an image on your site shows a tooltip, it has a title. That is often added by a theme, a gallery plugin or an old editor, sometimes as a copy of the alt text, and sometimes as the file name. The table shows how the two attributes differ.

alttitle
PurposeReplaces the image for people who cannot see itExtra advisory information
Shown on mouse hoverNoYes, after a short delay
Shown on touch screensNoNo, in most browsers
Shown on keyboard focusNoNo, in most browsers
Shown when the image failsYesNo
Read by screen readersYes, as the image nameInconsistently; used as a fallback name or extra description
Needed for accessibilityYes, on every imgNo

Why title is a poor home for information

A tooltip only appears for people using a mouse who happen to pause over the image. Phone and tablet users never see it, which on most small business sites is more than half of visitors. Keyboard users do not see it either, and people using screen magnifiers often find it appears off screen or disappears as they move. Screen readers treat it differently from one another: some read it after the alt, some only when alt is missing, and some ignore it by default. So anything important that lives only in a title is missed by many visitors.

How to check your alt text is really there

Since hovering will not show alt text, use one of these methods instead.

Inspect the image

Right-click the image and choose Inspect. DevTools opens with the <img> element selected, and you can read the alt value in the HTML. This shows what the browser received, which matters because some plugins and image components change the markup after you save it in the editor.

List every image at once

Paste this into the console to print a table of every image, its alt and any title:

console.table([...document.images].map(i => ({
  file: i.currentSrc.split('/').pop(),
  alt: i.hasAttribute('alt') ? i.alt : '(missing)',
  title: i.title || ''
})));

Images where the alt and title are identical are candidates for removing the title, as explained below.

Other quick checks

When images are turned off, alt text may be cut short if the image has small fixed dimensions. That is a display limit of the broken-image box, not a fault in the text.

When you want visitors to see a description

Sometimes the real wish behind hover text is a good one: you want people to know where a photo was taken, which product variant they are looking at or who is in a team picture. The reliable way to show that to everyone is a visible caption.

<figure>
  <img src="/images/bathroom.webp" width="1200" height="800"
       alt="Finished bathroom with walk-in shower and grey tiles">
  <figcaption>Bathroom refit completed in March, including underfloor heating</figcaption>
</figure>

The two pieces of text do different jobs. The alt describes what the image shows, for people who cannot see it. The caption adds context that everyone can read, on every device, without hovering. Screen readers announce the figure and caption as part of the page, so there is no need to repeat the caption inside the alt.

If the design calls for text over the image

Some galleries show a caption only when the pointer is over the image. If you do this, make it appear on keyboard focus as well, keep it visible on touch screens, and make sure the text is also in the HTML rather than added by a script. WCAG 1.4.13 asks that content shown on hover or focus can be dismissed, can be hovered itself and stays visible until the user moves away.

.gallery figure { position: relative; }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: .5rem .75rem; background: rgba(0, 0, 0, .7);
  opacity: 0; transition: opacity .2s;
}
.gallery figure:hover figcaption,
.gallery figure:focus-within figcaption { opacity: 1; }
@media (hover: none) { .gallery figcaption { opacity: 1; position: static; } }

Give the caption text a light shade with enough contrast against the dark overlay. A caption below the image is simpler, and usually better.

Removing title attributes that copy the alt

When a title holds exactly the same words as the alt, it adds a tooltip nobody asked for and can make some screen readers read the description twice. It is worth removing.

Here is a short script to find duplicates on the current page:

[...document.images]
  .filter(i => i.title && i.title.trim() === i.alt.trim())
  .forEach(i => console.log('Duplicate title:', i.currentSrc));
โš ๏ธ Do not remove the alt to get rid of a duplicate. The alt is the attribute that matters; the title is the one to go.

A worked example

A builder adds alt text to all forty images in a gallery of finished jobs, then reports that it is not working because nothing appears when the mouse rests on a photo. Inspecting one image shows alt="Finished bathroom with walk-in shower" in the HTML, so the alt text is present and screen readers will read it.

The owner explains that they wanted visitors to see a short note about each job. The gallery template is changed to wrap each image in a <figure> and print a <figcaption> from the image's caption field in the CMS. Each photo now shows a line such as Bathroom refit completed in March, including underfloor heating, under the image on phones and desktops alike.

While checking, the console script also finds that the gallery plugin was copying every alt into a title. That option is turned off, the duplicate tooltips disappear, and a quick test with VoiceOver confirms each image is now announced once, followed by its caption.

The fix, step by step

Step 1

Confirm the alt text is present

Right-click an image you think is not working and choose Inspect. Read the alt value on the selected img element in DevTools. If it holds the text you wrote, the alt text is working, and the only issue is the expectation of a tooltip. If it is missing or empty when it should not be, your CMS, theme or image plugin is not printing it, and you need to fix the source before going further.

Step 2

Audit every image on the page

Paste the console script from this guide into DevTools to print a table of every image with its alt and title. Note any image marked missing, any alt that is a file name, and any image whose title is the same as its alt. Repeat on each important template, such as the home page, a gallery page and a product page, so you know where the patterns come from.

Step 3

Fix missing alt at the source

For images with no alt, add it in the place your site really reads it. In WordPress that is the image block in each post as well as the media library. In Shopify it is the alt field on each product image. In code, it is the template or component that outputs the image. Clear any cache, reload the page and rerun the console table to confirm the values now appear.

Step 4

Decide what visitors should see

For each image, ask whether everyone needs extra information, such as a date, a location or a product variant. If they do, that text belongs in a visible caption, not in the alt and not in a title tooltip. If not, the alt alone is enough. Write the caption text separately from the alt so each does its own job without repeating the other.

Step 5

Add figure and figcaption markup

Wrap images that need visible text in a figure element and put the description in a figcaption after the image. In a CMS, use the built-in caption field or change the template to print one. Keep the alt focused on what the image shows. Reload the page on a phone and a desktop and confirm the caption appears on both without hovering.

Step 6

Remove titles that copy the alt

Turn off any theme, gallery or SEO plugin setting that copies alt text into a title attribute, or edit the template to stop printing it. If a lightbox reads the title for its caption, point it at the figcaption instead. Run the duplicate-finding script again and confirm it prints nothing. Hovering over the images should no longer show the repeated tooltip.

Step 7

Test without images and with a screen reader

Block images for your site in the browser settings and reload: the alt text should appear in each image's space. Turn images back on, then move through the page with NVDA, VoiceOver or TalkBack. Each informative image should be announced once with its alt, followed by any caption, and decorative images should be skipped. Fix anything that is read twice or not at all.

Edge cases worth knowing

Keeping it right

  1. Tell everyone who edits the site that alt text is checked by inspecting the image or running an audit, never by hovering.
  2. Give your CMS a caption field that the templates print in a <figcaption>, so editors have an obvious place for visible descriptions.
  3. Turn off any plugin or theme option that copies alt into title, and recheck after updates.
  4. Include an accessibility check of images in your routine for new pages.

For help writing the alt text itself, see the alt text guide and how long alt text should be.

Questions and answers

1. Why does my alt text not show when I hover over the image?

Alt text does not show on hover because it is not a tooltip, and no modern browser displays it that way. It is read by screen readers, shown when an image fails to load and used by search engines. Hover text comes from the title attribute instead. If you inspect the image in your browser's developer tools and can see the alt value in the HTML, your alt text is working correctly, even though nothing appears when you rest the mouse on the image.

2. How can I see the alt text of an image?

The quickest way to see alt text is to right-click the image, choose Inspect and read the alt attribute in the developer tools. Firefox also lists every image with its alternate text in Page Info (Ctrl+I), on the Media tab. You can block images in your browser settings so the alt text appears in their place, or listen with a screen reader. An accessibility audit tool lists missing alt across a whole page at once, which is quicker for large galleries.

3. What is the difference between alt and title on an image?

The alt attribute replaces the image for people who cannot see it, while the title attribute gives optional extra information shown as a tooltip on mouse hover. Alt is required for accessibility and is read by screen readers, shown when an image breaks and used in image search. Title tooltips do not appear on touch screens or for keyboard users, and screen readers handle them inconsistently. Every meaningful image needs alt; title is optional and often best left out.

4. Should I add a title attribute to every image?

No, you should not add a title attribute to every image. It does not help accessibility, it is not seen by phone or keyboard users, and when it repeats the alt text some screen readers read the same words twice. Google does not use it in place of alt text for image search either. If you want visitors to read something about an image, use a visible caption. Keep title for rare cases where an optional hint for mouse users is harmless.

5. Does alt text show on mobile phones?

Alt text does not show on mobile phones while the image is visible, just as on desktop. It appears only if the image fails to load, and it is read aloud by VoiceOver on iPhone and TalkBack on Android. There is no hover on a touch screen, so title tooltips do not appear either. If you want phone users to see a description of an image, the only reliable way is a caption printed on the page under or beside the image.

6. Did browsers ever show alt text as a tooltip?

Yes, old versions of Internet Explorer showed alt text as a tooltip when an image had no title attribute. That behaviour was never part of the HTML standard, and Microsoft removed it from later versions in standards mode. Chrome, Firefox, Safari and Edge have never shown alt as a tooltip. Many people still remember the old behaviour and assume their alt text is broken when it does not appear, which is why this question comes up so often.

7. Can I show alt text on hover with CSS or JavaScript?

You can, but it is rarely the right approach. CSS cannot display an attribute of an image directly, so you would need a script to copy the alt into a visible element, which then duplicates the text for screen reader users. A better option is to put the visible text in a figcaption and keep the alt for its proper job. If the caption must appear on hover, make it appear on keyboard focus too and keep it visible on touch screens.

Check the alt text on every image

The accessibility audit lists every image on a page with its alt text, flags missing and duplicated text and shows which images screen readers will announce.

Open Accessibility Fixes โ†’
๐Ÿ’ฌ Got a problem?
Related Guides: All Accessibility Fixes  ·  Alt Text Guide  ·  How Long Should Alt Text Be  ·  Image Alt Attributes  ·  Accessibility Guide  ·  Learning Hub

About aiwebpageseo

aiwebpageseo.com is a data-driven SEO and AEO (Answer Engine Optimisation) platform providing a free suite of technical SEO tools. Rather than relying on AI-theorised assumptions, the platform analyses live URL performance, delivering objective diagnostics, page speed metrics, CLS debugging, and site crawl data alongside actionable technical tutorials.