Many mobile themes switch off pinch zoom with one line at the top of each page. Have your designer remove it, and set body text large enough to read without zooming.

Pinching does nothing

A site looks tidy on a phone: one column, a menu button, photos that fit the screen. A visitor wants a closer look at a price under a photo and pinches to enlarge it. Nothing happens.

She tries tapping twice, then holds the phone closer. For most visitors this is an annoyance. For someone with low vision it ends the visit, because pinching is how they read the web on a phone.

The page looks finished. It has simply been told not to let anyone look closer.

The line that switches zoom off

Near the top of each page's code is a line called the viewport setting. It tells phones how wide to lay out the page, and a responsive site needs it.

Many mobile themes add two more instructions to that line: user-scalable=no, and a maximum scale of 1. Together they tell the phone not to let anyone enlarge the page, and phones obey.

Because the line sits in the theme's header, it applies to every page at once: the menu, the price list, the photo gallery and the contact details.

Why themes switch it off

Designers add the restriction for reasons that make sense from the designer's chair:

None of these outweighs a visitor's need to read the page. Each describes a problem with the layout, and the layout is where it should be solved.

Who needs to zoom

People with low vision rely on zoom most, but they are not alone. Older visitors whose eyes struggle with small print, people reading in bright sunlight, and anyone with a cracked screen all pinch.

So does anyone wanting a closer look at a detail: the grain of a countertop, the small print on a menu, the street names on a map.

WCAG 2.0, the accessibility guidelines most sites are measured against, asks that text can be resized to twice its size without losing content. On a phone, pinching is how most people do that.

Phones do have their own magnifier settings, but many people never find them, and they are clumsy for reading a page. Pinching is the tool everyone already knows.

Finding the setting

The quickest test is your own phone. Open the home page, a page with prices and a page with photos, and pinch each one. If nothing enlarges, the restriction is there.

To confirm it, open the site on a computer, view the page source, and look near the top for the line containing the word viewport. The words user-scalable=no or maximum-scale=1 in that line are the cause.

On a WordPress, Joomla or Drupal site it usually lives in the theme's header file, which is why one change fixes every page.

A worked example

A banh mi shop in Nanaimo sells sandwiches, rice bowls and iced coffee, mostly for takeout, and takes phone orders for pickup. Its site was rebuilt on a mobile theme last year.

Several regulars phoned to ask prices that were on the menu page, and one, who has low vision, mentioned at the counter that she could no longer enlarge the menu on her phone.

The menu page turned out to be a photo of the board above the counter. The prices were small to begin with, and the theme's viewport line blocked zoom on every page.

The developer removed the parts of the line that stopped zooming and kept the rest. The menu was retyped as text, at a size readable on a phone, with each price beside its item.

The board photo stayed, now opening at full size when touched, and tapping the phone number starts the call.

Customers can now read the menu at its normal size, and anyone who needs it larger can pinch, as they would on any other page.

Readable before anyone zooms

Zoom is the fallback, not the plan. Body text on a phone should be readable without it, which usually means around 16 pixels, with comfortable line spacing and strong contrast against the background.

Keep words out of images. Prices, menus, hours and notices set as text grow with the reader's settings and can be read aloud by screen readers; the same words inside a photo cannot.

Make buttons and links large enough to tap, with space between them, so that no one needs to zoom just to hit the right one.

Taking the restriction out safely

Ask your designer to remove only the zoom-blocking parts of the viewport line, not the line itself. Without it, phones show the desktop width shrunk to fit, which is worse.

Then check the layout with the page enlarged: fixed menus, sliders and wide tables are where problems show. Fix those in the design rather than by putting the restriction back.

If the site uses a WordPress theme, the change belongs in a child theme or a setting the theme provides, so the next theme update does not put it back.

The counter-case

Some web applications handle gestures themselves: an interactive map, a drawing tool, a booking grid you drag across. On those screens the page may need to own the pinch, and a restriction can be defensible.

Such screens should still offer their own zoom controls and text sizes, and the restriction belongs on that screen alone, not on every page.

A business site of text, prices and photos has no such need. Switching zoom off there helps no visitor and leaves some unable to read it.

Letting visitors zoom again

  1. Pinch three pages on your phone: home, prices and photos.
  2. Look for the viewport line in the page source.
  3. Ask your designer to remove the parts that stop zooming.
  4. Set body text at a size readable without zooming.
  5. Turn words in images into real text.
  6. Check the layout holds together when enlarged.
  7. Pinch again after every theme update.

Step three is a small edit in one shared file, and it matters most because it gives every visitor back a tool their phone already has, on every page at once.

Line spacing, which decides how easily that larger text reads, is the focus of paragraphs with the lines packed too tightly.


Frequently asked questions

Why can visitors not zoom on my site?

A line near the top of each page, the viewport setting, may tell phones not to allow zooming. Many mobile themes include it to keep the layout from moving.

How can I tell if zoom is blocked?

Pinch a few pages on your phone. If nothing enlarges, view the page source on a computer and look for user-scalable=no or maximum-scale=1 in the viewport line.

Who is affected when zoom is blocked?

People with low vision most of all, and also older visitors, anyone reading in bright sunlight, and anyone wanting a closer look at a photo, a price or a map.

Will removing it break the layout?

It should not, but check fixed menus, sliders and wide tables with the page enlarged. Problems found that way belong in the design, not in a setting that stops zooming.

Is allowing zoom enough on its own?

No. Body text should be readable at its normal size on a phone, with good contrast and real text rather than words inside images. Zoom is the fallback.

Can a theme update undo the fix?

It can, if the change was made in the theme's own files. Ask your designer to make it in a child theme or a theme setting that updates leave alone.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Pinching your own site does nothing?

Send us the address, and we will find the line that blocks zooming and check how the pages read without it.

Start a Conversation