Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Make use of divs and sections consistent #104

Closed
wants to merge 1 commit into from

3 participants

@ccschmitz

In a few places #primary is a <div>, and in others it's a <section>. This commit moves them all over to <section>'s, which is probably more appropriate.

@ccschmitz ccschmitz Make use of divs and sections consistent
In a few places #primary is a <div>, and in others it's a <section>.
This commit moves them all over to <section>'s, which I think is more
appropriate.
ab3c5fd
@BFTrick

+1 to this. Converting the #primary div into a section makes sense.

@obenland
Owner

As far as I'm concerned, we already use sections consistently. From the spec:

A section, [...] is a thematic grouping of content, typically with a heading.

The section element is not a generic container element. When an element is needed only for styling purposes or as a convenience for scripting, authors are encouraged to use the div element instead. A general rule is that the section element is appropriate only if the element's contents would be listed explicitly in the document's outline.

@obenland
Owner

No action in almost 4 weeks. Let's open a new ticket if there is disagreement with the direction _s takes on this, after #172 made it in.

@obenland obenland closed this
This was referenced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 8, 2012
  1. @ccschmitz

    Make use of divs and sections consistent

    ccschmitz authored
    In a few places #primary is a <div>, and in others it's a <section>.
    This commit moves them all over to <section>'s, which I think is more
    appropriate.
This page is out of date. Refresh to see the latest.
Showing with 34 additions and 34 deletions.
  1. +26 −26 404.php
  2. +2 −2 image.php
  3. +2 −2 index.php
  4. +2 −2 page.php
  5. +2 −2 single.php
View
52 404.php
@@ -8,40 +8,40 @@
get_header(); ?>
- <div id="primary" class="content-area">
- <div id="content" class="site-content" role="main">
+ <section id="primary" class="content-area">
+ <div id="content" class="site-content" role="main">
- <article id="post-0" class="post error404 not-found">
- <header class="entry-header">
- <h1 class="entry-title"><?php _e( 'Oops! That page can&rsquo;t be found.', '_s' ); ?></h1>
- </header><!-- .entry-header -->
+ <article id="post-0" class="post error404 not-found">
+ <header class="entry-header">
+ <h1 class="entry-title"><?php _e( 'Oops! That page can&rsquo;t be found.', '_s' ); ?></h1>
+ </header><!-- .entry-header -->
- <div class="entry-content">
- <p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', '_s' ); ?></p>
+ <div class="entry-content">
+ <p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', '_s' ); ?></p>
- <?php get_search_form(); ?>
+ <?php get_search_form(); ?>
- <?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
+ <?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
- <div class="widget">
- <h2 class="widgettitle"><?php _e( 'Most Used Categories', '_s' ); ?></h2>
- <ul>
- <?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
- </ul>
- </div><!-- .widget -->
+ <div class="widget">
+ <h2 class="widgettitle"><?php _e( 'Most Used Categories', '_s' ); ?></h2>
+ <ul>
+ <?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
+ </ul>
+ </div><!-- .widget -->
- <?php
- /* translators: %1$s: smilie */
- $archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', '_s' ), convert_smilies( ':)' ) ) . '</p>';
- the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
- ?>
+ <?php
+ /* translators: %1$s: smilie */
+ $archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', '_s' ), convert_smilies( ':)' ) ) . '</p>';
+ the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
+ ?>
- <?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
+ <?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
- </div><!-- .entry-content -->
- </article><!-- #post-0 .post .error404 .not-found -->
+ </div><!-- .entry-content -->
+ </article><!-- #post-0 .post .error404 .not-found -->
- </div><!-- #content .site-content -->
- </div><!-- #primary .content-area -->
+ </div><!-- #content .site-content -->
+ </section><!-- #primary .content-area -->
<?php get_footer(); ?>
View
4 image.php
@@ -9,7 +9,7 @@
get_header();
?>
- <div id="primary" class="content-area image-attachment">
+ <section id="primary" class="content-area image-attachment">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
@@ -106,6 +106,6 @@
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
- </div><!-- #primary .content-area .image-attachment -->
+ </section><!-- #primary .content-area .image-attachment -->
<?php get_footer(); ?>
View
4 index.php
@@ -14,7 +14,7 @@
get_header(); ?>
- <div id="primary" class="content-area">
+ <section id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php if ( have_posts() ) : ?>
@@ -43,7 +43,7 @@
<?php endif; ?>
</div><!-- #content .site-content -->
- </div><!-- #primary .content-area -->
+ </section><!-- #primary .content-area -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
View
4 page.php
@@ -13,7 +13,7 @@
get_header(); ?>
- <div id="primary" class="content-area">
+ <section id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
@@ -25,7 +25,7 @@
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
- </div><!-- #primary .content-area -->
+ </section><!-- #primary .content-area -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
View
4 single.php
@@ -8,7 +8,7 @@
get_header(); ?>
- <div id="primary" class="content-area">
+ <section id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
@@ -28,7 +28,7 @@
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
- </div><!-- #primary .content-area -->
+ </section><!-- #primary .content-area -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Something went wrong with that request. Please try again.