Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 23, 2021 07:26 am GMT

A11y tips: let the user control the zoom

When we define a <meta name="viewport"> there are two parameters that we can use that affect accessibility:

  • user-scalable="no": disables browser zoom on a web page
  • maximum-scale: limits the amount the user can zoom

Both are problematic for users with low vision who rely on browser zoom to see the contents of a web page. It is better not to define them and to leave complete freedom to the user to manage the zoom as needed when visiting our website.

Therefore the ideal definition is:

<meta  name="viewport"  content="width=device-width, initial-scale= 1"/>

Or even not define any <meta name="viewport">, like Google does. But please don't do like Instagram:

Capture of the HTML code of Instagram, in which the meta name viewport is highlighted with several parameters that disable the possibility of zooming

This is a perfect example of how not to use <meta name="viewport" />.


Original Link: https://dev.to/carlosespada/a11y-tips-let-the-user-control-the-zoom-2p86

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To