Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F17119703
ParserDiff.txt
Sbapple (Stephen Bapple)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Sbapple
Apr 19 2018, 4:48 AM
2018-04-19 04:48:43 (UTC+0)
Size
731 B
Referenced Files
None
Subscribers
None
ParserDiff.txt
View Options
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index b66031cc88..e1213971f6 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -486,7 +486,13 @@ class Parser {
# with CSS (T37247)
$class = $this->mOptions->getWrapOutputClass();
if ( $class !== false && !$this->mOptions->getInterfaceMessage() ) {
- $text = Html::rawElement( 'div', [ 'class' => $class ], $text );
+ # Enclose main body content with a <main> instead of a <div>.
+ # (T178398)
+ if ($class == "mw-parser-output") {
+ $test = Html::rawElement( 'main', null, $text );
+ } else {
+ $text = Html::rawElement( 'div', [ 'class' => $class ], $text );
+ }
}
$this->mOutput->setText( $text );
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5750008
Default Alt Text
ParserDiff.txt (731 B)
Attached To
Mode
T178398: Use semantic HTML5 <main> tag for primary page content
Attached
Detach File
Event Timeline
Log In to Comment