html - Why Google Tag Manager puts both display:none AND visibility:hidden on iframe? -


if take @ <noscript> part of google tag manager embed code, you'll notice like:

<noscript><iframe style="display:none;visibility:hidden" src="//www.googletagmanager.com/..." height="0" width="0"></iframe></noscript> 

i can understand why style="display:none" important (it hide element such takes 0 space in layout , yet still fetches content) however, why add "visibility:hidden" part? seems me adds no additional value, i'm assuming there must edge case or legacy or mobile browser doesn't behave correctly without it.

anyone know this?

could thing make sure screenreaders don't ever tell it. looks people have found problematic otherwise on here: http://juicystudio.com/article/screen-readers-display-none.php#comment3

i haven't tested this, can't confirm of it, layout-wise should not make differences display:none instructs remove element layout together, making invisible doesn't change anything.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -