Hidden content (tabs and accordions) is text that sits in the page’s HTML but stays folded away until a visitor clicks or taps to open it, such as a product’s delivery tab or a list of questions that expand one at a time. Google says this design pattern is allowed. The real risks are content that only loads after a click, and content written for robots rather than people.
What is hidden content? #
On a phone, space is tight. A product page might have 5 blocks: description, size guide, care, delivery and reviews. Rather than one long scroll, the designer folds 4 of them into tabs or an accordion. The words are still in the HTML. The browser just does not draw them until the visitor asks. This is not the same as spamdexing tricks such as white words on a white page, or cloaking, which shows robots a different page from people.
There are 3 common ways to build it:
- Native HTML. The
detailsandsummaryelements make a box that opens and closes with no script at all. - CSS and a little script. All panels are in the page; a click swaps which one is shown.
- Load on click. The panel is empty until a click asks the server for the words. This is the risky one.
Does Google index text inside tabs and accordions? #
Yes, if the text is in the page when it loads. Google’s spam policies list “accordion or tabbed content that toggle between hiding and showing additional content” as something that does not break its rules. Sliders, tooltips and text meant only for screen readers are on the same safe list.
Google’s mobile-first indexing guide goes further. Since Google reads the phone version of your page first (see mobile-first indexing), it suggests moving content into accordions or tabs to save space, instead of deleting it from the mobile layout.
When does hidden content cause problems? #
The same Google guide warns: “Google won’t load content that requires user interactions (for example, swiping, clicking, or typing) to load.” So the build method matters more than the look.
| How the panel is built | Words in the first HTML? | Can Google read it? |
|---|---|---|
details and summary |
Yes | Yes |
| All panels in the page, CSS hides the closed ones | Yes | Yes |
| Panel filled by a script on page load | After rendering | Usually, once rendered |
| Panel fetched from the server only on click | No | No, Google does not click |
The last row is a common cause of pages that look rich to people but thin to search engines. It is a JavaScript SEO issue, not a design one.
Why does it matter for AI answers? #
AI assistants quote passages. Google’s guide, AI features and your website, asks site owners to make sure important content is available in textual form. Text in a folded panel is still text, so it can be read and quoted. If an AI crawler reads only the raw HTML and does not run scripts, a panel that needs a click or a script to fill is empty to it. If you want an answer quoted in AI Overviews or ChatGPT, the safest home for it is plain HTML that loads with the page. Clear content chunking, one question per panel, also helps a machine lift the right passage.
How does the native HTML version work? #
MDN’s guide to the details element explains it: the summary is the label, and the rest stays hidden until the box is opened. Add the open attribute to start it open. Give several boxes the same name and only 1 can be open at a time, which makes an accordion with no script.
<details name="faq">
<summary>How long does delivery take?</summary>
<p>UK orders arrive in 2 to 3 working days.</p>
</details>
For custom panels, MDN’s page on the hidden attribute describes hidden="until-found". The panel stays shut, but the browser’s Find in page and links to a fragment can still reach it, and the browser opens it when they do. MDN also notes that plain hidden hides an element from all presentations, screen readers included.
Common mistakes #
- Fetching panels on click. If the words arrive only after a tap, search engines and most AI bots never see them.
- Hiding the main answer. Put the core answer in the open part of the page. Fold away the extras: specs, delivery, small print.
- Marking up closed panels as FAQ schema with different words. Google’s structured data guidelines say not to mark up content that is not visible to readers. Keep the FAQ schema word for word the same as the panel text.
- Different content on mobile and desktop. Google asks for the same content on both. Folding is fine; deleting is not.
- Stuffing panels. A tab full of repeated phrases is still keyword stuffing, open or shut.
- Headings that are not headings. Panel labels that are only styled text lose the structure that heading tags give.
A worked example #
A small UK shop sells walking boots. Its product page has a description, a size guide, care tips and a returns policy. On mobile, the size guide and care tips sit in 2 accordions built with details. The returns panel, built by an outside widget, loads its text only when tapped.
The shop opens Google’s URL Inspection tool in Search Console and views the rendered HTML. The size guide and care text are there. The returns text is not. The fix is to print the returns policy into the page when it loads, then let the widget only handle the open and close. After the next crawl, URL Inspection shows the returns text in the rendered HTML too.
How to check it #
- Open the page, right click and choose View page source. Search for a sentence from a closed panel. If it is there, it is in the first HTML.
- Paste the address into our JavaScript SEO checker: it shows whether panel words exist before scripts run.
- Try our AI readiness checker for a view of the page as a script-free bot gets it.
- Check panel labels with our heading checker.
- If panels carry FAQ markup, test it with our schema checker, and see the schema checker guide.
- For a whole site, the pages AI never reads report (Pro) is built for this job.
All of these sit in our free set of 56 tools on the free tools page.
Questions #
Does Google give less weight to text in a closed tab? #
Google’s public docs do not say it does. They list tabs and accordions as allowed and suggest them for mobile. We do not claim a weighting either way.
Are tabs bad for people? #
Not if the labels are clear. Good web accessibility means the panels open with a keyboard, which details does by default.
Is this part of on-page SEO? #
Yes. It sits between on-page SEO and technical SEO, because the build method decides what gets read.
Related words #
Sources #
- Google Search Central: spam policies, checked 25 November 2026
- Google Search Central: mobile-first indexing best practices, checked 25 November 2026
- Google Search Central: AI features and your website, checked 25 November 2026
- Google Search Central: general structured data guidelines, checked 25 November 2026
- MDN: the details element, checked 25 November 2026
- MDN: the hidden attribute, checked 25 November 2026
Updated 25 November 2026 by URSY.
Cite this page: Hidden content (tabs and accordions). URSY. Updated 25 November 2026. https://ursy.com/wiki/hidden-content-tabs-and-accordions/ · Section links
Tools for this
- LiveSSL Certificate Checkerexpiry, chain and mixed contentRun the check →
- LiveVerify an AI Botis it really GPTBot? IP, published lists and user agentRun the check →
- Livellms.txt Checker + Generatorcheck your llms.txt, or write llms.txt, llms-full.txt and llms.jsonRun the check →
- LiveAI Training Opt-Out Checker + Generatorwhat each AI may do with your site, and the exact lines to change itRun the check →
- LiveAI Consistency Checkerpage, schema, llms.txt and feeds state the same facts?Run the check →
- LiveGoogle Snippet Previewtitle and description length in pixels (in browser)Run the check →
- ProAI competitor gapPrompts where rivals appear and you don'tIn URSY Pro →
- ProAI fact accuracy monitorAI quoting your prices and facts wrong, with alertsIn URSY Pro →
- ProBrand facts (Truth Spine)Your official facts, each with proof, for AI to readIn URSY Pro →