[wp-trac] [WordPress Trac] #58773: Improve oEmbed lazy loading

WordPress Trac noreply at wordpress.org
Mon May 6 18:48:47 UTC 2024


#58773: Improve oEmbed lazy loading
-------------------------------------+-------------------------------------
 Reporter:  adamsilverstein          |       Owner:  adamsilverstein
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  6.6
Component:  Embeds                   |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-unit-      |     Focuses:  accessibility,
  tests                              |  performance, sustainability
-------------------------------------+-------------------------------------

Comment (by westonruter):

 Update: After
 [https://wordpress.slack.com/archives/C02RP4X03/p1715011007477499
 chatting] with @joedolson, I found out that `visibility:hidden` works just
 as well if not better than `opacity:0`. Not only does the lazy-loaded
 iframe load consistently across Chrome, Safari, and Firefox but there is
 also an actual accessibility ''benefit'' to using `visibility:hidden` over
 `clip`: the entire iframe is made non-interactive. With `clip` a user
 tabbing through links on a page will also encounter tab stops ''inside''
 the clipped iframe, which is particularly confusing to sighted users
 navigating by keyboard as focus seems to get lost on the page for several
 tab presses. In contrast, when an iframe is hidden with `visibility` then
 no tab stops occur in the iframe. The PR has been updated to apply this
 change.

 Side note: I also discovered that `clip` is [https://developer.mozilla.org
 /en-US/docs/Web/CSS/clip deprecated]!.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58773#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list