[TASK] Clean-up H1-H4 tag hierarchy in backend 73/20373/3
authorFelix Kopp <felix-source@phorax.com>
Wed, 1 May 2013 18:04:45 +0000 (20:04 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 1 May 2013 18:15:28 +0000 (20:15 +0200)
In backend headline tags should follow the semantic hierarchy.
Also for styling of headlines the hierarchy should be clear.

This patch brings semantically correct headline hierarchy for
all core backend modules and functionality: H1 through H4.

Also eases the migration path to include front-end css framework.

Change-Id: If91ec834098752ff4f7c30b0701cace578a2afd1
Fixes: #47785
Releases: 6.2
Reviewed-on: https://review.typo3.org/20373
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
19 files changed:
typo3/sysext/about/Resources/Private/Partials/About.html
typo3/sysext/aboutmodules/Resources/Private/Templates/Modules/Index.html
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/belog/Resources/Private/Partials/Content.html
typo3/sysext/beuser/Classes/ViewHelpers/SectionViewHelper.php
typo3/sysext/beuser/Resources/Private/Layouts/Default.html
typo3/sysext/beuser/Resources/Private/Templates/BackendUser/Index.html
typo3/sysext/extensionmanager/Resources/Private/Templates/Configuration/ShowConfigurationForm.html
typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html
typo3/sysext/extensionmanager/Resources/Private/Templates/List/ShowAllVersions.html
typo3/sysext/extensionmanager/Resources/Private/Templates/List/Ter.html
typo3/sysext/extensionmanager/Resources/Private/Templates/UpdateScript/Show.html
typo3/sysext/lang/Resources/Private/Templates/Language/Index.html
typo3/sysext/reports/Resources/Private/Templates/Report/Detail.html
typo3/sysext/reports/Resources/Private/Templates/Report/Index.html
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/t3skin/stylesheets/structure/module_help_about_module.css
typo3/sysext/t3skin/stylesheets/visual/main_content.css
typo3/templates/tceforms.html

index 19710e5..b52a846 100644 (file)
@@ -1,7 +1,7 @@
 <div class="typo3-mod-help-about-index-php-inner">
-       <h2>
+       <h1>
                <f:translate key="LLL:EXT:lang/locallang_mod_help_about.xlf:welcome" />
-       </h2>
+       </h1>
        <p>
                <f:translate
                        key="LLL:EXT:lang/locallang_mod_help_about.xlf:cms_description"
index 12368e6..ca9a488 100644 (file)
@@ -9,9 +9,9 @@
 
        {warningMessages -> f:format.raw()}
 
-       <h3>
+       <p>
                <f:translate key="LLL:EXT:lang/locallang_alt_intro.xlf:introtext2" />
-       </h3>
+       </p>
 
        <table border="0" cellpadding="0" cellspacing="0" id="typo3-aboutmodules">
                <tbody>
                                        <td colspan="3">
                                                <f:if condition="{mainModules.subModules -> f:count()} > 0">
                                                        <f:then>
-                                                               <h3><f:image src="{mainModule.icon}" alt="" /> {mainModule.label}</h3>
+                                                               <h2><f:image src="{mainModule.icon}" alt="" /> {mainModule.label}</h2>
                                                        </f:then>
                                                        <f:else>
-                                                               <h3>
+                                                               <h2>
                                                                        <a href="#" onclick="top.goToModule('{mainModule.name}'); return false;">
                                                                                <f:image src="{mainModule.icon}" alt="" />
                                                                        </a>
@@ -31,7 +31,7 @@
                                                                        <a href="#" onclick="top.goToModule('{mainModule.name}'); return false;">
                                                                                {mainModule.label}
                                                                        </a>
-                                                               </h3>
+                                                               </h2>
                                                        </f:else>
                                                </f:if>
                                        </td>
index e241066..171480d 100644 (file)
@@ -955,7 +955,7 @@ class DocumentTemplate {
                $str = '
 
        <!-- MAIN Header in page top -->
-       <h2>' . htmlspecialchars($text) . '</h2>
+       <h1>' . htmlspecialchars($text) . '</h1>
 ';
                return $this->sectionEnd() . $str;
        }
@@ -1036,7 +1036,7 @@ class DocumentTemplate {
         * @todo Define visibility
         */
        public function sectionHeader($label, $sH = FALSE, $addAttrib = '') {
-               $tag = $sH ? 'h3' : 'h4';
+               $tag = $sH ? 'h2' : 'h3';
                if ($addAttrib && substr($addAttrib, 0, 1) !== ' ') {
                        $addAttrib = ' ' . $addAttrib;
                }
index e6d0335..1eafe25 100755 (executable)
@@ -46,7 +46,7 @@ class SectionViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHel
                        $uniqueId = 'section_' . md5((microtime() . rand()));
                        return '<h3 class="collapsibleSection"><a href="#" onClick="$(\'' . $uniqueId . '\').toggle(); return false;">' . $title . '</a></h3>' . '<div id="' . $uniqueId . '" class="collapsibleSection">' . $this->renderChildren() . '</div>';
                }
-               return '<h3>' . $title . '</h3>' . $this->renderChildren();
+               return '<h2>' . $title . '</h2>' . $this->renderChildren();
        }
 
 }
index 2cbd1e2..3c113f9 100755 (executable)
@@ -23,7 +23,7 @@
                </div>
                <div id="typo3-docbody">
                        <div id="typo3-inner-docbody">
-                               <h2><f:translate key="backendUserAdministration">Backend User Administration</f:translate></h2>
+                               <h1><f:translate key="backendUserAdministration">Backend User Administration</f:translate></h1>
 
                                <f:flashMessages renderMode="div" />
 
index b4271ed..907e6a8 100755 (executable)
@@ -47,7 +47,7 @@
                Listing of all users
        </f:comment>
 
-       <h3><f:translate key="backendUserListing">Backend User Listing</f:translate></h3>
+       <h2><f:translate key="backendUserListing">Backend User Listing</f:translate></h2>
 
        <f:if condition="<f:count subject='{backendUsers}' /> > 50">
                <f:then>
index 69e63c0..d38d306 100644 (file)
@@ -7,10 +7,10 @@
 </f:section>
 
 <f:section name="module-headline">
-       <h2>
+       <h1>
                <f:translate key="extConfTemplate.headline" />
                {extension.key}
-       </h2>
+       </h1>
 </f:section>
 
 <f:section name="Content">
index 9eba243..c8ace0d 100644 (file)
@@ -7,7 +7,7 @@
 </f:section>
 
 <f:section name="module-headline">
-       <h2><f:translate key="manageExtensions">Manage extensions</f:translate></h2>
+       <h1><f:translate key="manageExtensions">Manage extensions</f:translate></h1>
 </f:section>
 
 <f:section name="Content">
index 578322f..f73047b 100644 (file)
@@ -7,7 +7,7 @@
 </f:section>
 
 <f:section name="module-headline">
-       <h2><f:translate key="showAllVersions" /> {extensionKey}</h2>
+       <h1><f:translate key="showAllVersions" /> {extensionKey}</h1>
 </f:section>
 
 <f:section name="Content">
index 6c15d35..21af2c0 100644 (file)
@@ -6,7 +6,7 @@
 </f:section>
 
 <f:section name="module-headline">
-       <h2><f:translate key="getExtensions">Get Extensions</f:translate></h2>
+       <h1><f:translate key="getExtensions">Get Extensions</f:translate></h1>
 </f:section>
 
 <f:section name="Content">
index bdc28e1..1d87e60 100644 (file)
@@ -7,7 +7,7 @@
 </f:section>
 
 <f:section name="module-headline">
-       <h2><f:translate key="updateScript.headline" arguments="{0: extensionKey}" /></h2>
+       <h1><f:translate key="updateScript.headline" arguments="{0: extensionKey}" /></h1>
 </f:section>
 
 <f:section name="Content">
index ebb52fb..c0a58dc 100644 (file)
@@ -2,7 +2,6 @@
 
 <f:layout name="Default"/>
 
-
 <f:section name="iconButtons">
        <span class="menuItem updateItem"><lang:be.spriteIcon icon="actions-system-extension-download" title="{f:translate(key:'button.update')}" /><f:translate key="button.update"/></span>
        &nbsp;
 
 
 <f:section name="content">
+       <h1><f:translate key="header.module" /></h1>
+
        <f:flashMessages renderMode="div" />
 
-       <h2><f:translate key="header.module" /></h2>
        <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                        <td class="languageSelectionListContainer">
index d119944..2849cda 100644 (file)
@@ -7,13 +7,14 @@
 </f:section>
 
 <f:section name="content">
-       <h2><f:translate key="title" /></h2>
+       <h1><f:translate key="title" /></h1>
+
        <f:if condition="{error}">
                <f:then>
                        {error}
                </f:then>
                <f:else>
-                       <h3 class="uppercase"><f:translate key="{report.title}" /></h3>
+                       <h2 class="uppercase"><f:translate key="{report.title}" /></h2>
                        <f:format.html parseFuncTSPath="">{content}</f:format.html>
                </f:else>
        </f:if>
index 712a56d..d8edc7c 100644 (file)
@@ -7,9 +7,9 @@
 </f:section>
 
 <f:section name="content">
-       <h2><f:translate key="title" /></h2>
+       <h1><f:translate key="title" /></h1>
 
-       <h3 class="uppercase"><f:translate key="reports_overview" /></h3>
+       <h2 class="uppercase"><f:translate key="reports_overview" /></h2>
 
        <dl class="t3-overview-list">
                <f:for each="{reports}" as="reportOverview" key="extensionKey">
index 1baf949..f172fa1 100644 (file)
@@ -133,7 +133,6 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                        $this->doc->getPageRenderer()->addInlineSetting('scheduler', 'runningIcon', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler') . 'res/gfx/status_running.png');
                        // Prepare main content
                        $this->content = $this->doc->header($GLOBALS['LANG']->getLL('function.' . $this->MOD_SETTINGS['function']));
-                       $this->content .= $this->doc->spacer(5);
                        $this->content .= $this->getModuleContent();
                } else {
                        // If no access, only display the module's title
@@ -341,13 +340,15 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                }
                /** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */
                $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $message, '', $severity);
+
                $content .= '<div class="info-block">';
-               $content .= '<h3>' . $GLOBALS['LANG']->getLL('hdg.lastRun') . '</h3>';
+               $content .= '<h2>' . $GLOBALS['LANG']->getLL('hdg.lastRun') . '</h2>';
                $content .= $flashMessage->render();
                $content .= '</div>';
+
                // Check CLI user
                $content .= '<div class="info-block">';
-               $content .= '<h3>' . $GLOBALS['LANG']->getLL('hdg.schedulerUser') . '</h3>';
+               $content .= '<h2>' . $GLOBALS['LANG']->getLL('hdg.schedulerUser') . '</h2>';
                $content .= '<p>' . $GLOBALS['LANG']->getLL('msg.schedulerUser') . '</p>';
                $checkUser = $this->checkSchedulerUser();
                if ($checkUser == -1) {
@@ -363,6 +364,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                }
                $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $message, '', $severity);
                $content .= $flashMessage->render() . '</div>';
+
                // Check if CLI script is executable or not
                $script = PATH_typo3 . 'cli_dispatch.phpsh';
                $isExecutable = FALSE;
@@ -374,7 +376,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                        $isExecutable = is_executable($script);
                }
                $content .= '<div class="info-block">';
-               $content .= '<h3>' . $GLOBALS['LANG']->getLL('hdg.cliScript') . '</h3>';
+               $content .= '<h2>' . $GLOBALS['LANG']->getLL('hdg.cliScript') . '</h2>';
                $content .= '<p>' . sprintf($GLOBALS['LANG']->getLL('msg.cliScript'), $script) . '</p>';
                if ($isExecutable) {
                        $message = $GLOBALS['LANG']->getLL('msg.cliScriptExecutable');
@@ -450,7 +452,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] . ' T (e';
                $now = date($dateFormat) . ', GMT ' . date('P') . ')';
                // Display the help text
-               $serverTime = '<h4>' . $GLOBALS['LANG']->getLL('label.serverTime') . '</h4>';
+               $serverTime = '<h3>' . $GLOBALS['LANG']->getLL('label.serverTime') . '</h3>';
                $serverTime .= '<p>' . $GLOBALS['LANG']->getLL('msg.serverTimeHelp') . '</p>';
                $serverTime .= '<p>' . sprintf($GLOBALS['LANG']->getLL('msg.serverTime'), $now) . '</p>';
                return $serverTime;
@@ -1081,7 +1083,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                // Also display information about the usage of server time
                if ($numRows > 0) {
                        $content .= $this->doc->spacer(20);
-                       $content .= '<h4>' . $GLOBALS['LANG']->getLL('status.legend') . '</h4>
+                       $content .= '<h3>' . $GLOBALS['LANG']->getLL('status.legend') . '</h3>
                        <ul>
                                <li><img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler'), 'res/gfx/status_failure.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.failure')) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.failure')) . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.failure') . '</li>
                                <li><img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler'), 'res/gfx/status_late.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.late')) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.late')) . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.late') . '</li>
@@ -1089,7 +1091,6 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                                <li><img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler'), 'res/gfx/status_scheduled.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.scheduled')) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.scheduled')) . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.scheduled') . '</li>
                                <li><img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler'), 'res/gfx/status_disabled.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.disabled')) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.disabled')) . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.disabled') . '</li>
                        </ul>';
-                       $content .= $this->doc->spacer(10);
                        $content .= $this->displayServerTime();
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
index d44ff82..aeddcae 100644 (file)
@@ -23,7 +23,7 @@ table#typo3-aboutmodules tr.c-mainitem td {
 }
 
 table#typo3-aboutmodules tr.c-mainitem td img {
-       vertical-align: bottom;
+       vertical-align: middle;
 }
 
 table#typo3-aboutmodules tr.c-subitem-row td {
index 1024078..d8036ea 100644 (file)
@@ -15,7 +15,6 @@ h4 {
 /* Occasionally used, eg. in About Modules: */
 h1 {
        font-size: 14px;
-       text-align: center;
 }
 
 /* MAIN page header: */
index 83cc4d9..5559945 100644 (file)
@@ -1,5 +1,5 @@
 <!-- ###TOTALWRAP### begin -->
-<h2>###PAGE_TITLE###</h2>
+<h1>###PAGE_TITLE###</h1>
 
 <table class="typo3-TCEforms">
        |