Re-factor templates and theme functions to use new HTML5 elements
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 |
Related Issues/Discussions
#1077510: Convert core templates and theme functions to HTML5 - Meta Issue
#1085590: Update to jQuery UI 1.9
Templates
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
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion