WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Measuring target size on iOS

for

Number of posts in this thread: 2 (In chronological order)

From: Ajay Sharma
Date: Wed, May 29 2024 8:07PM
Subject: Measuring target size on iOS
No previous message | Next message →

Greetings!

Looking for suggestions around possible ways to find out the accurate size of the elements on iOS devices. We can use accessibility inspector in Xcode, there are couple of ways, but that works only when we are developing the app. For a tester who does not have access to the development environment, the inspector would check only if the target size is less than 44 pixels. We are not able to find a way to bring that threshold down to 24 pixels. Wondering if anybody else been into this situation.

Cheers,
Ajay

From: Steve Green
Date: Thu, May 30 2024 9:45AM
Subject: Re: Measuring target size on iOS
← Previous message | No next message

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





-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of Ajay Sharma
Sent: Thursday, May 30, 2024 3:07 AM
To: WebAIM List < = EMAIL ADDRESS REMOVED = >
Subject: [WebAIM] Measuring target size on iOS



Greetings!



Looking for suggestions around possible ways to find out the accurate size of the elements on iOS devices. We can use accessibility inspector in Xcode, there are couple of ways, but that works only when we are developing the app. For a tester who does not have access to the development environment, the inspector would check only if the target size is less than 44 pixels. We are not able to find a way to bring that threshold down to 24 pixels. Wondering if anybody else been into this situation.



Cheers,

Ajay