Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php	(revision 26862)
+++ wp-includes/theme.php	(working copy)
@@ -1359,6 +1359,25 @@
 }
 
 /**
+ * Updates gallerie attributes to use HTML5 tags.
+ *
+ * @since 3.9.0
+ *
+ * @access private
+ * @param array $atts Gallery shortcode attributes.
+ * @return array
+ */
+function _html5_gallery_tags( $atts ) {
+	return  wp_parse_args( array(
+		'itemtag'    => 'figure',
+		'icontag'    => 'div',
+		'captiontag' => 'figcaption',
+	), $atts );
+}
+
+/**
  * Allows a theme to register its support of a certain feature
  *
  * Must be called in the theme's functions.php file to work.
@@ -1392,8 +1411,12 @@
 			}
 
 			// Calling 'html5' again merges, rather than overwrites.
-			if ( isset( $_wp_theme_features['html5'] ) )
+			if ( isset( $_wp_theme_features['html5'] ) ) {
 				$args[0] = array_merge( $_wp_theme_features['html5'][0], $args[0] );
+			}
+			if ( in_array( 'gallery', $args[0] ) ) {
+				add_filter( 'shortcode_atts_gallery', '_html5_gallery_tags' );
+			}
 			break;
 
 		case 'custom-header-uploads' :
@@ -1643,6 +1666,12 @@
 			remove_action( 'admin_menu', array( $GLOBALS['custom_background'], 'init' ) );
 			unset( $GLOBALS['custom_background'] );
 			break;
+
+		case 'html5' :
+			if ( did_action( 'wp_loaded' ) ) {
+				remove_filter( 'shortcode_atts_gallery', '_html5_gallery_tags' );
+			}
+			break;
 	}
 
 	unset( $_wp_theme_features[ $feature ] );
