Ship make <embed> and <object> behave more like <iframe>
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: farre, Assigned: farre)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Assignee | ||
Comment 1•2 years ago
|
||
This is about flipping:
browser.opaqueResponseBlocking.syntheticBrowsingContext
browser.opaqueResponseBlocking.syntheticBrowsingContext.filter
to true, enabling it for beta and release. Besides bug 1785227 we have no reported regressions. We have bug 1778503 tracking the worsened a11y story, but nothing for DevTools.
To be sure I thought I'd just make sure to gather feedback from a11y and DevTools before shipping, so that we're all ok with this.
Attached a file that shows how DevTools now sees that a cross-origin image embedded in either <object>
or <embed>
is loaded in a synthetic document.
Comment 2•2 years ago
|
||
If I understand correctly, using embed/object to embed an image is likely to be on very old sites. Is there any good reason to prefer embed/object over img? If they cared about a11y in the first place, does it seem reasonable to think they would have used img alt in the first place?
If all of the above seems reasonable, I think we're good here for a11y. We should maybe fix the a11y bug one day, but it seems very low priority.
Comment 3•2 years ago
|
||
Thanks for the heads up!
On DevTools side, we should make sure to hide the markup generated for the object/embed when devtools.inspector.showAllAnonymousContent
is set to false. Web developers probably don't expect to see the underlying elements.
I will file a bug for DevTools, but I don't think it has to block your work, it's a nice to have.
Comment 4•2 years ago
•
|
||
Attached a file that shows how DevTools now sees that a cross-origin image embedded in either <object> or <embed> is loaded in a synthetic document.
FWIW, I think the screenshot actually shows how DevTools see a same origin image. It seems that fail to inspect cross origin objects and embeds, regardless of their content (image, document, etc...). Filed Bug 1801814
Assignee | ||
Comment 5•2 years ago
|
||
(In reply to James Teh [:Jamie] from comment #2)
If I understand correctly, using embed/object to embed an image is likely to be on very old sites. Is there any good reason to prefer embed/object over img? If they cared about a11y in the first place, does it seem reasonable to think they would have used img alt in the first place?
If all of the above seems reasonable, I think we're good here for a11y. We should maybe fix the a11y bug one day, but it seems very low priority.
The lore of using images in <object>
and <embed>
says that they were once used to try out new image formats. Or at least the lore for <object>
, since <object>
could then embed an image, and if the user agent didn't implement the image format, then it could use the fallback content of <object>
. This is not how image formats are developed today, and I have no source for this piece of lore, but my point is that there is really no reason to do this. And in the end, the way forward is to recommend <iframe>
/<img>
instead of <object>
/<embed>
.
And yes, if you care about a11y, then you use img alt.(In reply to Julian Descottes [:jdescottes] from comment #4)
FWIW, I think the screenshot actually shows how DevTools see a same origin image. It seems that fail to inspect cross origin objects and embeds, regardless of their content (image, document, etc...). Filed Bug 1801814
Yes, exactly so.
Thank you both for the quick feedback!
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
This flips the prefs:
- browser.opaqueResponseBlocking.syntheticBrowsingContext
- browser.opaqueResponseBlocking.syntheticBrowsingContext.filter
that makes <object> and <embed> behave more like <iframe> when it
comes to image loading. This landed on Nightly through bug 1595491,
but with this we let it ride to Beta and then Release.
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fe1f1bd756f3 Make <object> and <embed> behave like <iframe>. r=peterv
Comment 8•2 years ago
|
||
bugherder |
Description
•