Google's John Mueller said that when it comes to hidden text on a page, Google is "good at ignoring it." It is one of those things that Google seems not to penalize for anymore but rather just not count the text that is not visible on the page.
This is not new news, and Google has been saying this at least since 2018. Google said then it discounts hidden text on a page. Google's John Mueller said then "we discount hidden text for ranking, so I doubt they're seeing any advantage from that (they can rank for other reasons)."
Then recently, in 2023, John Mueller said on Twitter, "Our systems are pretty good at recognizing hidden text, good at ignoring it, and good at focusing on what's otherwise on the site."
John added that these sites may have done it by accident, so it might make sense to let them know. "Some sites do stupid things together with good things, and are still useful for users. If you flag it to them, they might fix it," he wrote.
Our systems are pretty good at recognizing hidden text, good at ignoring it, and good at focusing on what's otherwise on the site. Some sites do stupid things together with good things, and are still useful for users. If you flag it to them, they might fix it.
— John Mueller is mostly not here 🐀 (@JohnMu) December 31, 2022
Google also said a site won't outrank you because of hidden text.
Let's not forget one of the earliest examples of popular sites that deployed hidden text and still has not removed it (they are all dead) - Heavens Gate.
Again, to be clear, this is about really spammy hidden text, like black text on a black background. Not about content hidden in expandable tabs, those are fine.
Forum discussion at Twitter.