SEO Tip: this is very important for sites that put FAQ content within accordions (very common situation).
Just because the content is shown on the page, that doesn't mean it can be indexed. And even if the content appears within GSC using URL Inspection/the Rich Results Test, that doesn't guarantee it can be indexed either.
For a client I'm working with, I realised that this was the case. Content that appears within accordions across various content formats (mostly FAQs) wasn't being indexed by Google despite Google's own tools showing that the content was being rendered.
I've come across this issue in the past, where the assumption is that Google's own tools should in theory show how the search engine is seeing your content. But this is often not the case, and requires some basic 101 type testing to determine whether there's an issue.
Have found the same approach applying to the indexing of images as it does to text on a page, where Google's tools aren't always able to highlight subtle issues, requiring the use of some basic search operators to troubleshoot the problem.
In the case of text not being indexed that is hidden within an accordion for my client, I did an exact match search on Google of the text that appears in the accordion. It wasn't surfacing, so there was clearly an issue with what Google was seeing.
Now, Google has often said that using search operators (the "site:" command included) is not a way to troubleshoot indexing issues. I'm going to have to disagree with this, as my hands-on experience working with sites goes against this.
Interestingly, I found that the
@Ahrefs Page Inspect feature did a great job of flagging this issue (a very underrated feature), so it could be a good tool to use as a next step. As you can see, the Page Inspect tool started showing the content in the tool after the fix was rolled out.
What was the issue in the first place? After speaking with the Developer, it turns out that some of the primitives that they were using under the hood weren't rendering hidden content by default. They then updated these to just hide as expected instead.
If you have important content on your site that is hidden within accordions at scale, make sure to do the most basic testing to ensure your content is able to be indexed by Google. And again, don't just rely on Google's tools if basic testing is telling you otherwise.