Lighthouse is a powerful tool that allows you to gather useful information about the performance of your web pages. One of the common design problems flagged is “Tap targets are not sized appropriately”. However, if you’re not a web developer or designer, you might not know what this means or how to fix it.
Fortunately, it’s relatively straightforward to make your pages more user-friendly and remedy this particular Lighthouse issue. For example, you can increase the size of tap targets or the spacing between them.
In this post, we’ll take a 🔎 closer look at Lighthouse and the “Tap targets are not sized appropriately” issue. Then, we’ll discuss a few ways you can fix it. Let’s begin!
An introduction to the “Tap targets are not sized appropriately” issue
Before we explore the “Tap targets are not sized appropriately” issue, you’ll need to know a bit about Lighthouse. This open-source tool enables you to assess the quality and performance of your web pages. For instance, you can gather information about your site’s accessibility, SEO, page speed, design, and more.
If you have a lot of experience with web development, you might run Lighthouse in Chrome DevTools or from the command line. However, PageSpeed Insights is also powered by Lighthouse, and is often a good alternative for beginners.
To get an advanced assessment of your website, all you need to do is enter your site’s URL and click on Analyze:
The analysis will begin shortly after. Then, you can view details about your web page’s performance and optimization. PageSpeed Insights makes this easy by categorizing details under clear headings.
If you scroll to the bottom, you’ll find the Mobile Friendly section. This is where you’ll see information about tap targets:
As you can see, our analysis returned the “Tap targets are not sized appropriately” issue. If you expand the section, you’ll find more detailed information about each of your tap targets.
Tap targets are the areas of your web page that users can interact with on touch devices. For example, visitors might be able to touch images, buttons, links, or form elements.
Lighthouse flags tap targets that are too small (smaller than 48 px by 48 px). You’ll also see the warning message if your tap targets don’t have enough space around them, resulting in overlapping targets.
You might run into this issue when you create the desktop version of your website without optimizing for the mobile experience. On desktop, all your page elements may sit nicely together, but if they can’t adapt to different screen sizes, this causes problems.
How to fix the “Tap targets are not sized appropriately” issue
Now that you know more about Lighthouse and the “Tap targets are not sized appropriately” issue, let’s take a look at some easy ways to fix it.
1. Increase the size of tap targets
The first way to fix the “Tap targets are not sized appropriately” issue is to increase the size of the tap targets themselves. So, let’s consider some design elements that serve as tap targets.
As we mentioned, links, buttons, icons, and form elements can all serve as tap or “touch” targets. Therefore, you’ll need to make sure that the size of these design features doesn’t dip below 48 px by 48 px. In this section, we’ll show you how to resize buttons and links on your pages.
Increase the size of buttons in WordPress
To resize buttons on your website, you’ll need to open the WordPress Customizer. You can do this by going to Appearance > Customizer in your dashboard. Next, select Buttons:
Now, there are a few ways that you can increase the size of buttons. First, you’re able to increase the Weight using the dropdown box. This won’t drastically alter the size of the tap target, but it will add some extra bulk and definition:
To further optimize a tap target, you can increase its Line Height. This will increase the size of the target vertically. Plus, if you edit the value of the Letter Spacing, you can extend the size of the button horizontally:
Then, remember to click on Publish to save your changes.
Increase the size of links in WordPress
Links can direct users to other pages on your website. Therefore, they might encourage visitors to stay on your site for longer.
However, in order for visitors to “touch” or tap your link targets, you need to make them clickable. The easiest way to do this is to increase the size of links.
You can do this directly within the relevant post or page. For example, you might feature a Query Loop block, so users can see a list of your published blog posts:
In this scenario, each of your post titles might contain a link. Meanwhile, you might feature an additional Read more link to lead visitors directly to the post.
One of the best things about using a link in the title of your posts is that it’s super simple to increase the size of the tap target. All you need to do is click on the link title. Then, navigate to Change heading level within the toolbar:
Here, you can increase the link size by opting for an H1 or H2 format.
Additionally, you might also have links in your paragraph text. You can increase the size of these tap targets by clicking on the element. Then, in the Block settings, head to Typography:
Here, use the SIZE (PX) dropdown to change from Normal to a larger setting:
Then, make sure to save your changes.
2. Increase the spacing between tap targets
The second way to fix the “Tap targets are not sized appropriately” issue in Lighthouse is to increase the spacing between tap targets. Chrome says that 8 px is usually sufficient. However, for smaller tap targets, you may need to increase the distance further to pass the Lighthouse audit. There are a few ways you can do this.
Adjust the padding property
One way to increase the space between tap targets is to adjust the padding property of the elements. This will increase the distance between targets by adding on to the element’s margins.
You can do this with your buttons by opening the WordPress Customizer. Then, head to Buttons. You’ll find the Padding property at the top of the General settings:
To fix the “Tap targets are not sized appropriately” issue, simply increase the padding around your button. Make sure you’re in PX and not EM or REM.
It can be a good idea to try increasing the padding on each side by 10 px first. Then, you can increase the size between targets even further if need be.
You might find that adding more padding shuffles one of your buttons onto a new line. In which case, you can also increase the padding value at the top and bottom to put more space between your targets:
Make sure to click on Publish to save your changes.
Use the WordPress Spacer block
Another approach to adding space between page elements is using the WordPress Spacer block. All this does is add some blank space to your page, keeping your tap targets a greater distance from each other.
For example, you might have two buttons stacked on top of each other:
Although it may look as though there is sufficient space between these touch targets, when you preview the layout on the front end, you can see that the buttons are almost overlapping:
In this case, you can add a Spacer block between the buttons to fix the “Tap targets are not sized appropriately” issue. Simply click on the + icon between the blocks. Then, search for “spacer”:
Add the block to your page and this instantly creates space between your elements. Now, click on Publish to save your changes and view the buttons on the front end:
As you can see, there is now a greater amount of space between your tap targets.
Conclusion 🧐
One of the ways that Lighthouse evaluates your website design for accessibility and user-friendliness is by judging your tap targets. If “tappable” or “touchable” design elements are too large or too close together, you might see the “Tap targets are not sized appropriately” issue.
To recap, here are two ways to fix this problem:
- 👉 Increase the size of tap targets.
- 👉 Increase the spacing between tap targets.
Do you have any questions about how to fix the “Tap targets are not sized appropriately” issue? Let us know in the comments below!
Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!