Bug #45512
closedMake the type attribute optional on script, style and link elements
100%
Description
With HTML5, the type
attribute is no longer required on script
, style
and link[rel="stylesheet"]
elements, as they automatically default to "text/javascript" and "text/css" (x2) respectively.
It should be possible to configure this via TypoScript.
Updated by Patrick Broens almost 12 years ago
- Complexity set to easy
This can simply be checked by using config.doctype = html5. We have to be aware that "type" can be set to a different value. I agree it can be removed when it is using the default value of text/javascript. Same for link tag and the style attribute.
Updated by Mathias Schreiber about 10 years ago
- Target version set to 7.2 (Frontend)
- Is Regression set to No
Updated by Benni Mack over 9 years ago
- Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Riccardo De Contardi over 9 years ago
- Status changed from New to Accepted
Updated by Gerrit Code Review over 8 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49500
Updated by Gerrit Code Review over 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49500
Updated by David Bruchmann over 7 years ago
Even not required after this issue is solved the type for javascript is now "application/javascript" and "text/javascript" is obsolet.
Updated by Oliver Hader over 7 years ago
- Category changed from 1050 to Frontend
Updated by Wittkiel Gruppe about 7 years ago
Would be nice for 8 and 9 LTS, because since ~December 2017 W3C-Validator shows a warning, for example:
Warning: The type attribute is unnecessary for JavaScript resources. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js" type="text/javascript"></script>
Updated by Riccardo De Contardi about 7 years ago
- Related to Task #83633: The type attribute is unnecessary for JavaScript resources. added
Updated by Riccardo De Contardi almost 7 years ago
I add here my two cents:
I wonder if it would be better to remove the attribute at all instead of making it optional with a condition on doctype, and let people add it explicitly; something similar to the "meta" (https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Meta/Index.html#meta) like:
includeJS { file1 = fileadmin/helloworld.js file1.attribute.type = text/javascript }
Updated by Riccardo De Contardi over 6 years ago
- Related to Bug #85053: Page Validation Warning added
Updated by Martin Weymayer about 6 years ago
- TYPO3 Version changed from 6.0 to 9
seems this "bug" is in 9.5??
Updated by Susanne Moog almost 6 years ago
- Status changed from Under Review to Accepted
Review was abandoned.
Updated by Benni Mack almost 6 years ago
We need the attribute, to also do stuff like "type=module" https://caniuse.com/#feat=es6-module
Updated by Benni Mack almost 6 years ago
- Related to Feature #86759: nomodule attribute on script tag added
Updated by Riccardo De Contardi almost 6 years ago
- Related to Bug #88316: Do not set type attribute by default in script tag for page.includeJS (HTML5 compliance) added
Updated by Riccardo De Contardi over 5 years ago
- Related to Feature #88772: Omit type=text/javascript in HTML5 script tags added
Updated by Georg Ringer over 5 years ago
- Status changed from Accepted to Closed
resolved with #88772 therefore I am closing this issue
Updated by Riccardo De Contardi over 5 years ago
- Status changed from Closed to Accepted
I re-open this one; the part about style
and link
tags are still missing
Updated by Gerrit Code Review over 4 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65548
Updated by Gerrit Code Review over 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65548
Updated by Gerrit Code Review over 4 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65548
Updated by Gerrit Code Review over 4 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65548
Updated by Riccardo De Contardi over 4 years ago
- Related to Bug #92126: Still <script type="text/javascript" ... hardcoded in PageRenderer.php -> leads to validity warning added
Updated by Gerrit Code Review over 4 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65548
Updated by Gerrit Code Review over 4 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65548
Updated by Gerrit Code Review over 4 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65548
Updated by Gerrit Code Review over 4 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65548
Updated by Benni Mack about 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0371f3460312e8cbdd5707a98f66c0dae96ef12a.