A while back, JR Oakes asked Martin Splitt of Google if he can confirm if there is a difference between display:none and visibility:hidden in terms of Google's ability to "see" the content in the container? Martin said he does not think there is a difference. JR Oakes then decided to test it.
Here are those original tweets:
Without having tested this, I don't think there's a big difference.
— Martin Splitt @ home 🏡🇨🇭 (@g33konaut) June 10, 2020
I see where you're coming from. I will take a look, but I guess the difference is going to be minimal b/c even though one is in the layout tree, it will not be marked as visible. But as of now: That's speculative.
— Martin Splitt @ home 🏡🇨🇭 (@g33konaut) June 11, 2020
What he found is that there is no difference between display:none and visibility:hidden. He said "Google still finds and indexes both. They will both appear as answer boxes." He even tested it to prove it.
JR said he "hid two Q/A pairs, one in visibility:hidden, the other display:none" and they both appeared in Google Search.
Here is a screen shot:
Thanks JR for testing this.
Forum discussion at Twitter.