Issue by mjohnq3, mbrett5062, tim.plunkett: Convert Bartik to HTML5.

8.0.x
Dries 2013-01-31 10:50:04 -05:00
parent 4741f77043
commit 2735dbb481
7 changed files with 105 additions and 95 deletions
core

View File

@ -70,7 +70,7 @@ class CommentPreviewTest extends CommentTestBase {
$this->assertLink($test_signature);
// Check that the user picture is displayed.
$this->assertFieldByXPath("//div[contains(@class, 'preview')]//div[contains(@class, 'user-picture')]//img", NULL, 'User picture displayed.');
$this->assertFieldByXPath("//article[contains(@class, 'preview')]//div[contains(@class, 'user-picture')]//img", NULL, 'User picture displayed.');
}
/**

View File

@ -44,7 +44,7 @@ class MappingDefinitionTest extends TaxonomyTestBase {
// Ensure the default bundle mapping for node is used. These attributes come
// from the node default bundle definition.
$node_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
$node_meta = $this->xpath("//div[(@about='$url')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$node_meta = $this->xpath("//article[(@about='$url')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$this->assertTrue(!empty($node_title), 'Property dc:title is present in meta tag.');
$this->assertTrue(!empty($node_meta), 'RDF type is present on post. Properties dc:date and dc:created are present on post date.');
}
@ -64,7 +64,7 @@ class MappingDefinitionTest extends TaxonomyTestBase {
// Ensure the mapping defined in rdf_module.test is used.
$test_bundle_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
$test_bundle_meta = $this->xpath("//div[(@about='$url') and contains(@typeof, 'foo:mapping_install1') and contains(@typeof, 'bar:mapping_install2')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$test_bundle_meta = $this->xpath("//article[(@about='$url') and contains(@typeof, 'foo:mapping_install1') and contains(@typeof, 'bar:mapping_install2')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$this->assertTrue(!empty($test_bundle_title), 'Property dc:title is present in meta tag.');
$this->assertTrue(!empty($test_bundle_meta), 'RDF type is present on post. Properties dc:date and dc:created are present on post date.');
}
@ -85,7 +85,7 @@ class MappingDefinitionTest extends TaxonomyTestBase {
// Ensure the default bundle mapping for node is used. These attributes come
// from the node default bundle definition.
$random_bundle_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
$random_bundle_meta = $this->xpath("//div[(@about='$url') and contains(@typeof, 'sioc:Item') and contains(@typeof, 'foaf:Document')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$random_bundle_meta = $this->xpath("//article[(@about='$url') and contains(@typeof, 'sioc:Item') and contains(@typeof, 'foaf:Document')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$this->assertTrue(!empty($random_bundle_title), 'Property dc:title is present in meta tag.');
$this->assertTrue(!empty($random_bundle_meta), 'RDF type is present on post. Properties dc:date and dc:created are present on post date.');
}

View File

@ -32,7 +32,7 @@
* @ingroup themeable
*/
?>
<div id="comments" <?php print $attributes; ?>>
<section id="comments" <?php print $attributes; ?>>
<?php if ($content['comments'] && $node->type != 'forum'): ?>
<?php print render($title_prefix); ?>
<h2 class="title"><?php print t('Comments'); ?></h2>
@ -45,4 +45,4 @@
<h2 class="title comment-form"><?php print t('Add new comment'); ?></h2>
<?php print render($content['comment_form']); ?>
<?php endif; ?>
</div>
</section>

View File

@ -68,59 +68,68 @@
* @ingroup themeable
*/
?>
<div class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
<article class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?> role="article">
<div class="attribution">
<header class="comment-header">
<?php print render($user_picture); ?>
<div class="attribution">
<?php print render($user_picture); ?>
<div class="submitted">
<p class="commenter-name">
<?php print $author; ?>
</p>
<p class="comment-time">
<?php print $created; ?>
</p>
<p class="comment-permalink">
<?php print $permalink; ?>
</p>
<?php
// Indicate the semantic relationship between parent and child comments
// for accessibility. The list is difficult to navigate in a screen
// reader without this information.
if ($parent):
?>
<p class="comment-parent element-invisible">
<?php print $parent; ?>
</p>
<div class="submitted">
<p class="commenter-name">
<?php print $author; ?>
</p>
<p class="comment-time">
<?php print $created; ?>
</p>
<p class="comment-permalink">
<?php print $permalink; ?>
</p>
<?php
// Indicate the semantic relationship between parent and child comments
// for accessibility. The list is difficult to navigate in a screen
// reader without this information.
if ($parent):
?>
<p class="comment-parent element-invisible">
<?php print $parent; ?>
</p>
<?php endif; ?>
</div>
</div> <!-- /.attribution -->
<div class="comment-text">
<div class="comment-arrow"></div>
<?php if ($new): ?>
<span class="new"><?php print $new; ?></span>
<?php endif; ?>
</div>
</div>
<div class="comment-text">
<div class="comment-arrow"></div>
<?php print render($title_prefix); ?>
<h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
<?php print render($title_suffix); ?>
</div> <!-- /.comment-text -->
<?php if ($new): ?>
<span class="new"><?php print $new; ?></span>
<?php endif; ?>
</header> <!-- /.comment-header -->
<?php print render($title_prefix); ?>
<h3<?php print $title_attributes; ?>><?php print $title; ?></h3>
<?php print render($title_suffix); ?>
<div class="content"<?php print $content_attributes; ?>>
<?php
// We hide the comments and links now so that we can render them later.
hide($content['links']);
print render($content);
?>
</div> <!-- /.content -->
<div class="content"<?php print $content_attributes; ?>>
<?php
// We hide the comments and links now so that we can render them later.
hide($content['links']);
print render($content);
?>
<?php if ($signature): ?>
<footer class="comment-footer">
<?php if ($signature): ?>
<div class="user-signature clearfix">
<?php print $signature; ?>
</div>
<?php endif; ?>
</div> <!-- /.content -->
<?php endif; ?>
<?php print render($content['links']); ?>
</div> <!-- /.comment-text -->
</div>
<nav>
<?php print render($content['links']); ?>
</nav>
</footer> <!-- /.comment-footer -->
</article>

View File

@ -13,9 +13,8 @@
* @ingroup themeable
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->langcode; ?>" lang="<?php print $language->langcode; ?>" dir="<?php print $language->dir; ?>">
<!DOCTYPE html>
<html lang="<?php print $language->langcode; ?>" dir="<?php print $language->dir; ?>">
<head>
<?php print $head; ?>
<title><?php print $head_title; ?></title>
@ -30,7 +29,7 @@
<div id="page-wrapper"><div id="page">
<div id="header"><div class="section clearfix">
<header id="header" role="banner"><div class="section clearfix">
<?php if ($site_name || $site_slogan): ?>
<div id="name-and-slogan"<?php if ($hide_site_name && $hide_site_slogan) { print ' class="element-invisible"'; } ?>>
<?php if ($site_name): ?>
@ -47,10 +46,10 @@
<?php endif; ?>
</div> <!-- /#name-and-slogan -->
<?php endif; ?>
</div></div> <!-- /.section, /#header -->
</div></header> <!-- /.section, /#header -->
<div id="main-wrapper"><div id="main" class="clearfix">
<div id="content" class="column"><div class="section">
<main id="content" class="column" role="main"><section class="section">
<a id="main-content"></a>
<?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
<?php print $content; ?>
@ -59,7 +58,7 @@
<?php print $messages; ?>
</div></div> <!-- /.section, /#messages -->
<?php endif; ?>
</div></div> <!-- /.section, /#content -->
</section></main> <!-- /.section, /#content -->
</div></div> <!-- /#main, /#main-wrapper -->
</div></div> <!-- /#page, /#page-wrapper -->

View File

@ -76,22 +76,24 @@
* @ingroup themeable
*/
?>
<div id="node-<?php print $node->nid; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?>>
<article id="node-<?php print $node->nid; ?>" class="<?php print $attributes['class']; ?> clearfix"<?php print $attributes; ?> role="article">
<?php print render($title_prefix); ?>
<?php if (!$page): ?>
<h2<?php print $title_attributes; ?>>
<a href="<?php print $node_url; ?>"><?php print $label; ?></a>
</h2>
<?php endif; ?>
<?php print render($title_suffix); ?>
<header>
<?php print render($title_prefix); ?>
<?php if (!$page): ?>
<h2<?php print $title_attributes; ?>>
<a href="<?php print $node_url; ?>"><?php print $label; ?></a>
</h2>
<?php endif; ?>
<?php print render($title_suffix); ?>
<?php if ($display_submitted): ?>
<div class="meta submitted">
<?php print render($user_picture); ?>
<?php print $submitted; ?>
</div>
<?php endif; ?>
<?php if ($display_submitted): ?>
<div class="meta submitted">
<?php print render($user_picture); ?>
<?php print $submitted; ?>
</div>
<?php endif; ?>
</header>
<div class="content clearfix"<?php print $content_attributes; ?>>
<?php
@ -108,15 +110,15 @@
if ($teaser || !empty($content['comments']['comment_form'])) {
unset($content['links']['comment']['#links']['comment-add']);
}
// Only display the wrapper div if there are links.
// Only display the footer if there are links.
$links = render($content['links']);
if ($links):
?>
<div class="link-wrapper">
<footer class="link-wrapper">
<?php print $links; ?>
</div>
</footer>
<?php endif; ?>
<?php print render($content['comments']); ?>
</div>
</article>

View File

@ -89,9 +89,9 @@
?>
<div id="page-wrapper"><div id="page">
<div id="header" class="<?php print $secondary_menu ? 'with-secondary-menu': 'without-secondary-menu'; ?>" role="banner"><div class="section clearfix">
<header id="header" class="<?php print $secondary_menu ? 'with-secondary-menu': 'without-secondary-menu'; ?>" role="banner"><div class="section clearfix">
<?php if ($secondary_menu): ?>
<div id="secondary-menu" class="navigation" role="navigation">
<nav id="secondary-menu" class="navigation" role="navigation">
<?php print theme('links__system_secondary_menu', array(
'links' => $secondary_menu,
'attributes' => array(
@ -104,7 +104,7 @@
'class' => array('element-invisible'),
),
)); ?>
</div> <!-- /#secondary-menu -->
</nav> <!-- /#secondary-menu -->
<?php endif; ?>
@ -143,7 +143,7 @@
<?php print render($page['header']); ?>
<?php if ($main_menu): ?>
<div id="main-menu" class="navigation" role="navigation">
<nav id="main-menu" class="navigation" role="navigation">
<?php print theme('links__system_main_menu', array(
'links' => $main_menu,
'attributes' => array(
@ -156,12 +156,12 @@
'class' => array('element-invisible'),
),
)); ?>
</div> <!-- /#main-menu -->
</nav> <!-- /#main-menu -->
<?php endif; ?>
</div></div> <!-- /.section, /#header -->
</div></header> <!-- /.section, /#header -->
<?php if ($messages): ?>
<div id="messages"><div class="section clearfix">
@ -170,16 +170,16 @@
<?php endif; ?>
<?php if ($page['featured']): ?>
<div id="featured"><div class="section clearfix">
<aside id="featured"><div class="section clearfix">
<?php print render($page['featured']); ?>
</div></div> <!-- /.section, /#featured -->
</div></aside> <!-- /.section, /#featured -->
<?php endif; ?>
<div id="main-wrapper" class="clearfix"><div id="main" class="clearfix">
<?php print $breadcrumb; ?>
<div id="content" class="column" role="main"><div class="section">
<main id="content" class="column" role="main"><section class="section">
<?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
<a id="main-content"></a>
<?php print render($title_prefix); ?>
@ -190,9 +190,9 @@
<?php endif; ?>
<?php print render($title_suffix); ?>
<?php if ($tabs): ?>
<div class="tabs">
<nav class="tabs" role="navigation">
<?php print render($tabs); ?>
</div>
</nav>
<?php endif; ?>
<?php print render($page['help']); ?>
<?php if ($action_links): ?>
@ -203,31 +203,31 @@
<?php print render($page['content']); ?>
<?php print $feed_icons; ?>
</div></div> <!-- /.section, /#content -->
</section></main> <!-- /.section, /#content -->
<?php if ($page['sidebar_first']): ?>
<div id="sidebar-first" class="column sidebar"><div class="section">
<div id="sidebar-first" class="column sidebar"><aside class="section">
<?php print render($page['sidebar_first']); ?>
</div></div> <!-- /.section, /#sidebar-first -->
</aside></div> <!-- /.section, /#sidebar-first -->
<?php endif; ?>
<?php if ($page['sidebar_second']): ?>
<div id="sidebar-second" class="column sidebar"><div class="section">
<div id="sidebar-second" class="column sidebar"><aside class="section">
<?php print render($page['sidebar_second']); ?>
</div></div> <!-- /.section, /#sidebar-second -->
</aside></div> <!-- /.section, /#sidebar-second -->
<?php endif; ?>
</div></div> <!-- /#main, /#main-wrapper -->
<?php if ($page['triptych_first'] || $page['triptych_middle'] || $page['triptych_last']): ?>
<div id="triptych-wrapper"><div id="triptych" class="clearfix">
<div id="triptych-wrapper"><aside id="triptych" class="clearfix">
<?php print render($page['triptych_first']); ?>
<?php print render($page['triptych_middle']); ?>
<?php print render($page['triptych_last']); ?>
</div></div> <!-- /#triptych, /#triptych-wrapper -->
</aside></div> <!-- /#triptych, /#triptych-wrapper -->
<?php endif; ?>
<div id="footer-wrapper"><div class="section">
<div id="footer-wrapper"><footer class="section" role="contentinfo">
<?php if ($page['footer_firstcolumn'] || $page['footer_secondcolumn'] || $page['footer_thirdcolumn'] || $page['footer_fourthcolumn']): ?>
<div id="footer-columns" class="clearfix">
@ -244,6 +244,6 @@
</div> <!-- /#footer -->
<?php endif; ?>
</div></div> <!-- /.section, /#footer-wrapper -->
</footer></div> <!-- /.section, /#footer-wrapper -->
</div></div> <!-- /#page, /#page-wrapper -->