Problem/Motivation
There are w3c html validation errors for the following:
Error: The frameborder attribute on the iframe element is obsolete. Use CSS instead.
Error: The allowtransparency attribute on the iframe element is obsolete. Use CSS instead.
These are added in the field formatter: OEmbedFormatter
Proposed resolution
Remove the invalid attributes from the HTML and add CSS to achieve the same result.
| Comment | File | Size | Author |
|---|
Issue fork drupal-3071446
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kirst25Comment #3
kirst25Comment #4
kirst25Comment #5
kirst25Comment #6
idebr commentedComment #7
phenaproximaThis seems like a good idea, but will need front-end framework manager review (due to CSS changes) and test coverage.
Comment #13
marcvangendThe oembed.formatter.css files in the 'stable' and 'stable9' themes contain copies of core/modules/media/css/oembed.formatter.css, so here is a patch that applies the same change to those copies.
Comment #14
lendudeHere is a test for the removed attributes.
Comment #15
marcvangendCombining improvement from #13 with test from #14 and fixing code style errors.
Comment #19
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #21
guptahemant commentedAttaching a patch for drupal 10, In drupal 10 stable theme is no longer present hence removed the changes related to that.
Comment #22
guptahemant commentedAttaching a patch for drupal 10.1.x version
Comment #25
dcam commentedI rerolled the patch in #22 for D11 and converted it to an MR.
Comment #26
smustgrave commentedLeft some comments on MR.
Comment #27
dcam commented@smustgrave What are we adding an upgrade path for? Unless I'm missing something there are no configuration changes. The values for those attributes were hard-coded.
Comment #28
smustgrave commentedIf they're not being added to configuration then can ignore that.
Comment #29
dcam commentedThe comments on the MR have been answered. I don't believe any changes are necessary.
Comment #30
nod_works for me, thanks.
Comment #31
smustgrave commentedThanks for taking a look @nod_
Tested out by using a stark theme since Olivero disables media modules ombed library.
Tested with and without the patch and can confirm I'm not seeing any visual regression from removing the attributes.
LGTM
Comment #36
alexpottCommitted and pushed 655cb760fc to 11.x and 0bc782b1f8 to 11.0.x and 24b4a8ea8e to 10.4.x and 04fb2d1d1e to 10.3.x. Thanks!
Made the change above on commit because allowtransparency is no longer in the file.