Pages

Thursday 23 August 2012

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

ElementSpecArticles
articleWHATWG | W3CHTML5 DoctorDive into HTML5
asideWHATWG | W3CHTML5 Doctor
audioWHATWG | W3CHTML5 Doctor
bdiWHATWG | W3CHTML5 Doctor
canvasWHATWG | W3CHTML5 Doctor
commandWHATWG | W3C
datalistWHATWG | W3C
detailsWHATWG | W3C
embedWHATWG | W3C
figcaptionWHATWG | W3CHTML5 Doctor
figureWHATWG | W3CHTML5 Doctor
footerWHATWG | W3CHTML5 DoctorDive into HTML5
headerWHATWG | W3CHTML5 DoctorDive into HTML5
hgroupWHATWG | W3CHTML5 Doctor
keygenWHATWG | W3C
markWHATWG | W3CHTML5 Doctor
meterWHATWG | W3C
menuWHATWG | W3C
navWHATWG | W3CHTML5 DoctorDive into HTML5
outputWHATWG | W3C
progressWHATWG | W3C
sectionWHATWG | W3CHTML5 Doctor
sourceWHATWG | W3C
summaryWHATWG | W3C
timeWHATWG | W3CHTML5 DoctorDive into HTML5
trackWHATWG | W3CHTML5 Doctor
videoWHATWG | W3CHTML5 Doctor
wbrWHATWG | W3C

Related Issues/Discussions

Templates

TemplateIssue(s)
aggregator-feed-source.tpl.php#1189804: Convert aggregator-feed-source.tpl.php to HTML5
aggregator-item.tpl.php#1189806: Convert aggregator-item.tpl.php 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.tpl.php 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: Convert page.tpl.php to HTML5
taxonomy-term.tpl.php#1190206: Convert taxonomy-term.tpl.php 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 FunctionIssue(s)
theme_field()#1189842: Convert theme_field() 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()
theme_task_list()#1222254: theme_task_list() should be replaced with theme_item_list() in all instances
theme_filter_tips_more_info()#1222260: theme_filter_tips_more_info() should be replaced with the l() function
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).

No comments:

Post a Comment