WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Measuring target size on iOS

for

From: Steve Green
Date: May 30, 2024 9:45AM


There is no simple way to test it, and no automated testing tool that I am aware of. We use a screen ruler app to measure the spacing and size of components. https://apps.apple.com/us/app/screen-ruler/id1104790987 is a good one for iOS.



However, it's not quite that simple because you need to know the pixel ratio of your device. A long time ago, one CCS pixel was the same as one physical pixel, but that has not been the case for some years. Most devices now have between 2 and 3 physical pixels per CSS pixel, which improves the image quality. You therefore need to tell your screen ruler what the pixel ratio is.



There are several ways to do this, such as:



1. Go to https://mydevice.io to find viewport width.

2. https://yesviz.com is a database of information when you don't have device to hand. Pixel ratio information is found here as well.

3. Use the codepen at https://codepen.io/stoumann/pen/oNwQyxd. Set in full screen view and measure the screen width.

4. Go to https://www.gsmarena.com and search for your phone type. The physical pixel details are In the display section.



When using the screen ruler on a device for the first time, I always use it to measure an image of known size in order to verify that I am using the correct pixel ratio.



Steve Green

Managing Director

Test Partners Ltd