Yoast SEO and Rank Math ignore the text of WooCommerce product tabs
On October 16 I asked Yoast SEO 28.7 and Rank Math 1.0.280 to analyze a WooCommerce product whose tabs hold most of its text.
Yoast counted 58 words. The page itself holds 642.
A disclosure first: I build ProdTabs, a product tabs plugin, and its Premium version is what changes those numbers. That part comes at the end, so weigh it accordingly.
The test page
I ran this on a copy of my demo shop, a French store that sells advent calendars, with WordPress 7.1.3 and WooCommerce 11.2.
The product is a Lindor chocolate calendar. Its description is short, and the rest of the text lives in six custom tabs (contents, ingredients, a review, shipping, a buying guide and a FAQ) plus the Additional information tab of WooCommerce.
Only one SEO plugin was active at a time. I opened the product in the editor and read the word count that each plugin reports in its analysis.
What the two plugins report
Here's the "Text length" check of Yoast, with the Premium version of my plugin switched off:
The text contains 58 words. This is far below the recommended minimum of 300 words.
And Rank Math, on the same product and the same setup:
Content is 66 words long.
Both numbers match the product description alone, which is about 70 words by my own count.
What the page actually contains
I wrote a small Node script that fetches the product page and counts the words in each tab panel of the HTML. This is what it printed:
$ node count-words.mjs http://localhost:8091/?p=14
panel-description: 70 words
panel-contenu-des-cases: 171 words
panel-composition-et-allergenes: 96 words
panel-notre-avis: 85 words
panel-livraison: 53 words
panel-bien-choisir-un-calendrier-chocolat: 56 words
panel-questions-frequentes: 81 words
panel-additional_information: 30 words
8 panels, 642 words in the HTML
So the two plugins analyze roughly a tenth of the page.
Seven of those eight panels carry the hidden attribute until a visitor clicks their tab. The text is still in the HTML, and the HTML is what a crawler downloads.
Why they miss it
Yoast and Rank Math analyze the content of the editor. For a WooCommerce product, that's the description and nothing else.
Tabs live somewhere else: product attributes for Additional information, and product meta fields for the tabs that a plugin adds.
Both SEO plugins let other plugins add text to their analysis. Yoast documents registerModification in its JavaScript API, and Rank Math documents a rank_math_content filter.
I searched the code of Custom Product Tabs for WooCommerce 1.8.6, which has more than 80,000 active installs, for either entry point:
$ grep -rlE "YoastSEO|rank_math_content|registerModification" yikes-inc-easy-custom-woocommerce-product-tabs
$ echo $?
1
No match. The free version of ProdTabs doesn't use them either, so the gap isn't specific to one plugin.
Does it matter?
Yes. Without a fix, the content analysis of your SEO plugin is useless on these product pages: every piece of advice it gives is based on a tenth of the page.
A product page with 642 words gets a red light and a request for at least 300.
The checks that read the text, such as keyphrase density, run on those 58 words too. Follow them, and you'll end up padding the description with text that your tabs already contain.
Any optimization work starts with a measurement you can trust, and this one is off by a factor of ten.
Feeding the tabs into the analysis
ProdTabs Premium uses those two entry points to add the visible tabs of the product, each one as a heading followed by its text. With it switched on, on the same product:
Yoast SEO 28.7 The text contains 579 words. Good job!
Rank Math 1.0.280 Content is 577 words long.
That's the description plus the visible tabs. A tab you've hidden on that product stays out of the count, since visitors don't see it either.
Premium is a separate plugin on top of the free one, at 49 dollars a year for one site.
What I didn't test
- Yoast SEO Premium and Rank Math Pro.
- The live refresh: Premium runs the analysis again 800 milliseconds after a tab changes, but I haven't watched it happen.
- The new block-based product editor of WooCommerce.
- Tabs plugins other than ProdTabs and Custom Product Tabs.
- How Google weighs text in tabs. I found plenty of opinions on that, and no documentation from Google that I could cite.
If most of your product text sits in tabs, read the word count of your SEO plugin as a count of the description, not of the page.