Re-factor templates and theme functions to use new HTML5 elements

Last updated on
6 October 2020

Overview

HTML5 brings a number of new elements to enhance the semantics of our web pages. The table below lists these new elements along with links to the spec and relevant articles on each.

New HTML5 Elements

Element Spec Articles
article WHATWG | W3C HTML5 Doctor, Dive into HTML5
aside WHATWG | W3C HTML5 Doctor
audio WHATWG | W3C HTML5 Doctor
bdi WHATWG | W3C HTML5 Doctor
canvas WHATWG | W3C HTML5 Doctor
command WHATWG | W3C
datalist WHATWG | W3C
details WHATWG | W3C
embed WHATWG | W3C
figcaption WHATWG | W3C HTML5 Doctor
figure WHATWG | W3C HTML5 Doctor
footer WHATWG | W3C HTML5 Doctor, Dive into HTML5
header WHATWG | W3C HTML5 Doctor, Dive into HTML5
hgroup WHATWG | W3C HTML5 Doctor
keygen WHATWG | W3C
mark WHATWG | W3C HTML5 Doctor
meter WHATWG | W3C
menu WHATWG | W3C
nav WHATWG | W3C HTML5 Doctor, Dive into HTML5
output WHATWG | W3C
progress WHATWG | W3C
section WHATWG | W3C HTML5 Doctor
source WHATWG | W3C
summary WHATWG | W3C
time WHATWG | W3C HTML5 Doctor, Dive into HTML5
track WHATWG | W3C HTML5 Doctor
video WHATWG | W3C HTML5 Doctor
wbr WHATWG | W3C

#1077510: Convert core templates and theme functions to HTML5 - Meta Issue
#1085590: Update to jQuery UI 1.9

Templates

Template Issue(s)
aggregator-feed-source.tpl.php #1189804: Convert aggregator-feed-source.html.twig to HTML5
aggregator-item.tpl.php #1189806: Convert aggregator-item.html.twig to HTML5
aggregator-summary-item.tpl.php #1221710: Convert aggregator-summary-item.tpl.php to HTML5
aggregator-summary-items.tpl.php #1189810: Convert aggregator-summary-items.tpl.php to HTML5
aggregator-wrapper.tpl.php #1221712: Convert aggregator-wrapper.tpl.php to HTML5
block.tpl.php #1077610: Convert block.tpl.php to HTML5
block-admin-display-form.tpl.php #1221718: Refactor block-admin-display-form.tpl.php
book-all-books-block.tpl.php #1189832: Convert book-all-books-block.tpl.php to HTML5
book-export-html.tpl.php #1189834: Convert book-export-html.tpl.php to HTML5
book-navigation.tpl.php #1189828: Convert book-navigation.tpl.php to HTML5
book-node-export-html.tpl.php #1221724: Convert book-node-export-html.tpl.php to HTML5
comment.tpl.php #1189816: Convert comment.tpl.php to HTML5
comment-wrapper.tpl.php #1229434: Convert comment-wrapper.tpl.php to HTML5
forum-submitted.tpl.php #1189850: Convert forum-submitted.tpl.php to HTML5
html.tpl.php #1077566: Convert html.tpl.php to HTML5
maintenance-page.tpl.php #1189822: Convert maintenance-page.html.twig to HTML5
node.tpl.php #1077602: Convert node.tpl.php to HTML5
poll-bar--block.tpl.php #1229440: Convert poll-bar--block.tpl.php to HTML5
poll-bar.tpl.php #1229442: Convert poll tpls and markup to HTML5
poll-results--block.tpl.php #1190172: Convert poll-results--block.tpl.php to HTML5
poll-results.tpl.php #1229444: Convert poll-results.tpl.php to HTML5
poll-vote.tpl.php #1190176: Convert poll-vote.tpl.php to HTML5
profile-block.tpl.php #1229450: Convert profile-block.tpl.php to HTML5
profile-listing.tpl.php #1190202: Convert profile-listing.tpl.php to HTML5
page.tpl.php #1077578: [Followup] Convert bartiks page.tpl.php to HTML5
taxonomy-term.tpl.php #1190206: Convert taxonomy-term.html.twig to HTML5
toolbar.tpl.php #1190210: Convert toolbar.tpl.php to HTML5
user-profile.tpl.php #1190214: Convert user-profile.tpl.php to HTML5
user-profile-category.tpl.php #1190218: Convert user-profile-category.tpl.php to HTML5

Theme Functions

Theme Function Issue(s)
theme_field() #1189842: Convert field.html.twig to HTML5
theme_datetime() #1183250: Add a theme_datetime() function to consistently theme dates and datetimes
theme_book_title_link() #1222248: Remove theme_book_title_link() use l() instead
theme_task_list() #1222254: Remove theme_task_list() and call theme('item_list__tasks') instead.
theme_filter_tips_more_info() #1222260: Remove theme_filter_tips_more_info() from core
drupal_placeholder() #1447678: Fix strings with broken semantics caused by using %variable placeholder incorrectly

Upgrade Theme Functions to support the render system

For D8, all theme functions should support the render system. This provides support for HTML content to be passed to any theme function with the expectation that the HTML content will be render as DOM and not text.

We will start with theme_datetime and use this as the model for existing theme functions that do not support the render system (to be listed) and new theme functions (see above).

Theme Function Issue(s)
meta issue #1400214: Rationalize theme functions to improve consistency, including render elements

Additional Resources

Help improve this page

Page status: No known problems

You can: