Skip to content
Book a call

Content a crawler never sees: tabs, filters and click to reveal

· 4-minute read · Measurement and growth · by Direct Softworks

Google does not click. Anything your page only creates after a click, a tab change or a filter does not exist for it. Hiding content is fine. Not rendering it is not.

Google's crawler does not click. It does not open tabs, expand accordions, pick a filter or type into a search box. Its mobile-first indexing guidance says so directly: do not lazy-load primary content on user interaction, because Google will not load content that needs swiping, clicking or typing to appear.

That sentence is easy to agree with and easy to break, because modern components are built around exactly those interactions. A tab component that renders only the active panel. A filter that maps over the matching items and drops the rest. A "Show more" button that fetches the next page. In each case the content is not hidden from the crawler. It does not exist until someone clicks.

Hidden and absent are different states, and most of this subject is learning to tell them apart.

Hidden is fine, absent is not

If the HTML contains the text and CSS hides it, anything reading the HTML has it. The same Google page explicitly allows moving content into tabs or accordions on mobile, as long as it is equivalent to the desktop version.

If the component renders only what is selected, the other panels are not in the HTML at all. A crawler reading the HTML gets one tab. A renderer that runs the JavaScript also gets one tab, because it will not click the others.

In code the difference is usually a line. A filter that removes items, against one that marks them:

// Absent: unmatched items are never rendered.
items.filter(matches).map((i) => <Card key={i.id} item={i} />)

// Hidden: every item is rendered, unmatched ones are hidden.
items.map((i) => (
  <div key={i.id} hidden={!matches(i)}>
    <Card item={i} />
  </div>
))

Our project gallery works the second way. You can narrow the case studies to browser or desktop builds, and the filter hides cards rather than unmounting them. The comment in the component gives the reason in one line: the list is this page's content, and content that only exists after a click is content a crawler never sees.

The default state is the crawler's state

A crawler sees a page in its default state: no interaction, no stored preference, no query string it did not find in a link. So the useful question about any interactive page is what that default state contains.

Our blog index is built on that rule. With no search and no topic selected, every article is in the server-rendered HTML, four on the front page and the rest in the archive by month. Searching or picking a topic only changes what is shown once the page is running in a browser. A crawler gets the whole archive; a reader gets a filter on top of it.

It also had to avoid a trap we had already fallen into once. Reading the query with Next.js's useSearchParams would have put the list behind a Suspense boundary, and during static prerendering the boundary's fallback is what gets written into the HTML. We learned that on our contact page, which served 98 characters to a crawler. So the index reads ?q= and ?topic= from the browser once after hydration and writes them back with replaceState, which keeps a search shareable as a link without taking the list out of the HTML.

Visible only after a script runs

There is a softer version of the same problem: content that is in the HTML but invisible until JavaScript does something. Scroll-reveal animation is the common case, text that starts at zero opacity and is faded in by an observer when it scrolls into view.

For marketing copy we accept that trade. For our legal pages we declined it. The privacy policy and terms render their body without the reveal, and the component says why: this is the text a visitor is entitled to read and a regulator may ask us to show. If the script fails, is blocked or has simply not run yet, an animated policy is a blank page. Browser find-in-page landing on faded text is the same problem in a smaller form.

The same comment records a second lesson. The observer fires when a set fraction of the target's own area is visible, so one reveal wrapped around a long document can never trip on a phone: the most of it that fits on screen at once is about a tenth, which is below the threshold. The document would simply never appear.

How to check your own pages

Fetch the page without a browser and read what comes back. Then take each interactive component in turn and ask one question: in the default state, is every piece of content that matters in that HTML? If a tab, a filter or a "Show more" stands between the crawler and something you want found, either render it and hide it, or give it a URL of its own.

Interactivity belongs on top of content, never in front of it. Build the page so that it is complete before anyone touches it, then let the controls hide and reveal. It is the same lesson as the contact page: judge the artefact a crawler receives, not the page as you experience it.

More notes