Welcome to TagMyCode

Please login or create account to add a snippet.
Language: HTML
Posted by: Gary Peach
Added: Sep 13, 2017 9:26 PM
Modified: Sep 13, 2017 11:50 PM
Views: 5
how to set iframe titles for google analytics and trackers to be accessible
  1. (Ignoring the error your checking tool reported,
  2. which may or may not be an actual error.)
  4. If you want to state that the iframe content is not meaningful
  5. (i.e., only decorative/presentational), you could use
  6. the presentation role from WAI-ARIA.
  8. In HTML5, the iframe element can have one of these WAI-ARIA roles:
  9. application, document, img, presentation.
  11. As Ville Niemi points out in the comments,
  12. the aria-hidden state should be used instead
  13. (as you seem to hide the iframe with CSS).
  14. Adding a role is not needed then, as it doesn’t matter
  15. what role something has if it’s not perceivable
  16. in the first place.
  18. other ways...
  20. https://developer.paciellogroup.com/blog/2010/04/making-sure-hidden-frames-are-hidden/