From 8ec3b59988eb9fc4cccb459baa9b5f38672805dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jasmina=20Lie=C3=9Fmann?= <minapokhalo+typo3@gmail.com>
Date: Mon, 17 Jun 2024 17:01:35 +0200
Subject: [PATCH] [TASK] Improve UX and accessibility of toolbar items
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Several minor adjustments have been made to the toolbar items to
improve the UX and accessibility.

This includes, among other things, the following:
* Setting a correct heading hierarchy and adding some role attributes.
* When a bookmark has been assigned to a group, the section with the
  remaining ungrouped bookmarks now displays a corresponding heading.
* The form for editing bookmarks now has form labels and static input
  labels have been replaced.
* When no documents are currently open or have been used recently, the
  section headings are now displayed with corresponding info texts.
* Links to perform actions are now displayed in button style.

Resolves: #104129
Releases: main
Change-Id: I43030a078df4424f1a99c2020b347cfce498c949
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84738
Tested-by: Jasmina Ließmann <minapokhalo+typo3@gmail.com>
Tested-by: Garvin Hicking <gh@faktor-e.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jasmina Ließmann <minapokhalo+typo3@gmail.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Garvin Hicking <gh@faktor-e.de>
---
 .../ToolbarItems/HelpToolbarItemDropDown.html |   1 -
 .../ShortcutToolbarItemDropDown.html          |  17 ++-
 .../ShortcutToolbarItemEditForm.html          |  23 ++--
 .../ToolbarItems/UserToolbarItemDropDown.html |  38 ++----
 .../Private/Language/locallang_core.xlf       |  23 +++-
 .../Private/Language/locallang_misc.xlf       |   6 -
 .../Workspace/WorkspaceModuleCest.php         |   4 +-
 .../Resources/Private/Language/locallang.xlf  |  19 +--
 .../Templates/ToolbarItems/DropDown.html      | 123 ++++++++++--------
 .../Templates/ToolbarItems/DropDown.html      |  63 +++++----
 10 files changed, 183 insertions(+), 134 deletions(-)

diff --git a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/HelpToolbarItemDropDown.html b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/HelpToolbarItemDropDown.html
index 7d399805cc02..dffd1ac9762e 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/HelpToolbarItemDropDown.html
+++ b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/HelpToolbarItemDropDown.html
@@ -1,7 +1,6 @@
 <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
 <p class="h3 dropdown-headline" id="help-dropdown-headline">{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.help')}</p>
 <f:if condition="{modules}">
-    <hr class="dropdown-divider" aria-hidden="true">
     <nav class="t3js-helpmenu">
         <ul class="dropdown-list" role="menu" aria-labelledby="help-dropdown-headline">
             <f:for each="{modules}" as="module">
diff --git a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ShortcutToolbarItemDropDown.html b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ShortcutToolbarItemDropDown.html
index fa668cdfd2f1..ad6a2c6eb0fd 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ShortcutToolbarItemDropDown.html
+++ b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ShortcutToolbarItemDropDown.html
@@ -13,7 +13,12 @@
                 <hr class="dropdown-divider" aria-hidden="true">
             </f:if>
             <f:if condition="{group.title}">
-                <p class="h3 dropdown-headline" id="shortcut-group-{group.id}">{group.title}</p>
+                <f:then>
+                    <p class="h4 dropdown-headline" id="shortcut-group-{group.id}">{group.title}</p>
+                </f:then>
+                <f:else if="{shortcutMenu -> f:count()} > 1">
+                    <p class="h4 dropdown-headline"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarks.notGrouped" /></p>
+                </f:else>
             </f:if>
             <ul class="dropdown-list" data-shortcutgroup="{group.id}">
                 <f:for each="{group.shortcuts}" as="shortcut">
@@ -33,13 +38,19 @@
                                 </span>
                             </span>
                         </a>
-                        <a href="#" class="dropdown-item dropdown-item-action t3js-shortcut-edit"
+                        <a
+                            href="#"
+                            class="dropdown-item dropdown-item-action t3js-shortcut-edit"
                             title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarksEdit')}"
+                            role="button"
                         >
                             <core:icon identifier="actions-open" alternativeMarkupIdentifier="inline"/>
                         </a>
-                        <a href="#" class="dropdown-item dropdown-item-action t3js-shortcut-delete"
+                        <a
+                            href="#"
+                            class="dropdown-item dropdown-item-action t3js-shortcut-delete"
                             title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarksDelete')}"
+                            role="button"
                         >
                             <core:icon identifier="actions-delete" alternativeMarkupIdentifier="inline"/>
                         </a>
diff --git a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ShortcutToolbarItemEditForm.html b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ShortcutToolbarItemEditForm.html
index d5bb4bc0f8ee..3d7bc0839813 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ShortcutToolbarItemEditForm.html
+++ b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/ShortcutToolbarItemEditForm.html
@@ -1,21 +1,26 @@
-<form class="t3js-shortcut-form" role="form" data-shortcutid="{selectedShortcutId}">
-    <p class="h3 dropdown-headline">
-        {f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarksEdit')}
-    </p>
-    <hr class="dropdown-divider" aria-hidden="true">
+<p class="h3 dropdown-headline">
+    <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarksEdit" />
+</p>
+<form class="t3js-shortcut-form" data-shortcutid="{selectedShortcutId}">
     <div class="dropdown-item-text">
         <div class="form-group">
-            <input type="text" class="form-control" name="shortcutTitle" value="{selectedShortcut.label}"/>
+            <label for="shortcutTitle" class="form-label">
+                <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarks.field.title" />
+            </label>
+            <input type="text" class="form-control" name="shortcutTitle" id="shortcutTitle" value="{selectedShortcut.label}"/>
         </div>
         <div class="form-group">
-            <select class="form-select" name="shortcutGroup">
+            <label for="shortcutGroup" class="form-label">
+                <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.bookmarks.field.group" />
+            </label>
+            <select class="form-select" name="shortcutGroup" id="shortcutGroup">
                 <f:for each="{shortcutGroups}" key="shortcutGroupId" as="shortcutGroupTitle">
                     <option value="{shortcutGroupId}" {f:if(condition: '{selectedShortcutGroupId} == {shortcutGroupId}', then: 'selected="selected"')}>{shortcutGroupTitle}</option>
                 </f:for>
             </select>
         </div>
         <input type="hidden" name="shortcutId" value="{selectedShortcutId}" />
-        <input type="reset" class="btn btn-default" value="Cancel"/>
-        <input type="submit" class="btn btn-success" value="Save"/>
+        <input type="reset" class="btn btn-default" value="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}" />
+        <input type="submit" class="btn btn-primary" value="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:save')}" />
     </div>
 </form>
diff --git a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/UserToolbarItemDropDown.html b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/UserToolbarItemDropDown.html
index 57addb4545ec..78baa899556a 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/UserToolbarItemDropDown.html
+++ b/typo3/sysext/backend/Resources/Private/Templates/ToolbarItems/UserToolbarItemDropDown.html
@@ -35,7 +35,7 @@
 </f:if>
 <f:if condition="{f:count(subject: recentUsers)} > 0">
     <hr class="dropdown-divider" aria-hidden="true">
-    <p class="h3 dropdown-headline"><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang.xlf:usermodule.su.list" /></p>
+    <p class="h4 dropdown-headline"><f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang.xlf:usermodule.su.list" /></p>
     <ul class="modulemenu-group-container">
         <f:for each="{recentUsers}" as="user">
             <li>
@@ -57,34 +57,24 @@
             </li>
         </f:for>
     </ul>
-    <hr class="dropdown-divider" aria-hidden="true">
 </f:if>
+<hr class="dropdown-divider" aria-hidden="true">
 <f:if condition="{switchUserMode}">
     <f:then>
-        <typo3-backend-switch-user
-            class="dropdown-item"
-            mode="exit">
-            <span class="dropdown-item-columns">
-                <span class="dropdown-item-column dropdown-item-column-icon" aria-hidden="true">
-                    <core:icon identifier="actions-logout" size="small" alternativeMarkupIdentifier="inline"/>
-                </span>
-                <span class="dropdown-item-column dropdown-item-column-title">
-                    {f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:buttons.exitSwitchUser')}
-                </span>
-            </span>
-        </typo3-backend-switch-user>
+        <div class="dropdown-item-text">
+            <typo3-backend-switch-user class="btn btn-sm btn-default" mode="exit">
+                <core:icon identifier="actions-logout" size="small" alternativeMarkupIdentifier="inline"/>
+                <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:buttons.exitSwitchUser" />
+            </typo3-backend-switch-user>
+        </div>
     </f:then>
     <f:else>
-        <f:be.link route="logout" class="dropdown-item" target="_top">
-            <span class="dropdown-item-columns">
-                <span class="dropdown-item-column dropdown-item-column-icon" aria-hidden="true">
-                    <core:icon identifier="actions-logout" size="small" alternativeMarkupIdentifier="inline"/>
-                </span>
-                <span class="dropdown-item-column dropdown-item-column-title">
-                    {f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:buttons.logout')}
-                </span>
-            </span>
-        </f:be.link>
+        <div class="dropdown-item-text">
+            <f:be.link route="logout" class="btn btn-sm btn-default" target="_top">
+                <core:icon identifier="actions-logout" size="small" alternativeMarkupIdentifier="inline"/>
+                <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:buttons.logout" />
+            </f:be.link>
+        </div>
     </f:else>
 </f:if>
 </html>
diff --git a/typo3/sysext/core/Resources/Private/Language/locallang_core.xlf b/typo3/sysext/core/Resources/Private/Language/locallang_core.xlf
index 8bde18688aae..7a97d510a603 100644
--- a/typo3/sysext/core/Resources/Private/Language/locallang_core.xlf
+++ b/typo3/sysext/core/Resources/Private/Language/locallang_core.xlf
@@ -978,7 +978,7 @@ Do you want to refresh it now?</source>
 				<source>Close</source>
 			</trans-unit>
 			<trans-unit id="rm.closeAllDocs" resname="rm.closeAllDocs">
-				<source>Close all</source>
+				<source>Close all open documents</source>
 			</trans-unit>
 			<trans-unit id="rm.clearCache_clearCache" resname="rm.clearCache_clearCache">
 				<source>Clear cache</source>
@@ -1365,6 +1365,15 @@ Do you want to refresh it now?</source>
 			<trans-unit id="toolbarItems.bookmarks" resname="toolbarItems.bookmarks">
 				<source>Bookmarks</source>
 			</trans-unit>
+			<trans-unit id="toolbarItems.bookmarks.field.group" resname="toolbarItems.bookmarks.field.group">
+				<source>Group</source>
+			</trans-unit>
+			<trans-unit id="toolbarItems.bookmarks.field.title" resname="toolbarItems.bookmarks.field.title">
+				<source>Title</source>
+			</trans-unit>
+			<trans-unit id="toolbarItems.bookmarks.notGrouped" resname="toolbarItems.bookmarks.notGrouped">
+				<source>Not grouped</source>
+			</trans-unit>
 			<trans-unit id="toolbarItems.bookmark" resname="toolbarItems.bookmark">
 				<source>Bookmark</source>
 			</trans-unit>
@@ -1419,6 +1428,18 @@ Do you want to refresh it now?</source>
 			<trans-unit id="toolbarItems.workspace" resname="toolbarItems.workspace">
 				<source>Workspace</source>
 			</trans-unit>
+			<trans-unit id="toolbarItems.workspace.intro.text" resname="toolbarItems.workspace.intro.text">
+				<source>The following workspaces are available to you.</source>
+			</trans-unit>
+			<trans-unit id="toolbarItems.workspace.intro.link" resname="toolbarItems.workspace.intro.link">
+				<source>Workspaces Module</source>
+			</trans-unit>
+			<trans-unit id="toolbarItems.workspace.intro.link.description" resname="toolbarItems.workspace.intro.link.description">
+				<source>To view changes made in a workspace, please go to:</source>
+			</trans-unit>
+			<trans-unit id="toolbarItems.workspace.noWorkspaceFound" resname="toolbarItems.workspace.noWorkspaceFound">
+				<source>No workspaces found!</source>
+			</trans-unit>
 			<trans-unit id="toolbarItems.sysinfo" resname="toolbarItems.sysinfo">
 				<source>System Information</source>
 			</trans-unit>
diff --git a/typo3/sysext/core/Resources/Private/Language/locallang_misc.xlf b/typo3/sysext/core/Resources/Private/Language/locallang_misc.xlf
index 83ff6f59708f..cdf5109e9827 100644
--- a/typo3/sysext/core/Resources/Private/Language/locallang_misc.xlf
+++ b/typo3/sysext/core/Resources/Private/Language/locallang_misc.xlf
@@ -159,18 +159,12 @@
 			<trans-unit id="bookmark_inactive" resname="bookmark_inactive">
 				<source>inactive</source>
 			</trans-unit>
-			<trans-unit id="bookmark_noWSfound" resname="bookmark_noWSfound">
-				<source>ERROR: No workspaces found!</source>
-			</trans-unit>
 			<trans-unit id="bookmark_FEPreview" resname="bookmark_FEPreview">
 				<source>Enable Frontend Preview</source>
 			</trans-unit>
 			<trans-unit id="bookmark_workspaceComparisonView" resname="bookmark_workspaceComparisonView">
 				<source>Enable comparison view</source>
 			</trans-unit>
-			<trans-unit id="bookmark_workspace" resname="bookmark_workspace">
-				<source>Go to Workspace Module</source>
-			</trans-unit>
 			<trans-unit id="overwriteExistingFiles" resname="overwriteExistingFiles">
 				<source>Overwrite existing files</source>
 			</trans-unit>
diff --git a/typo3/sysext/core/Tests/Acceptance/Application/Workspace/WorkspaceModuleCest.php b/typo3/sysext/core/Tests/Acceptance/Application/Workspace/WorkspaceModuleCest.php
index ef959dfb9919..312502970889 100644
--- a/typo3/sysext/core/Tests/Acceptance/Application/Workspace/WorkspaceModuleCest.php
+++ b/typo3/sysext/core/Tests/Acceptance/Application/Workspace/WorkspaceModuleCest.php
@@ -65,8 +65,8 @@ final class WorkspaceModuleCest
 
         $I->switchToMainFrame();
         $I->click(Topbar::$dropdownToggleSelector, self::$topBarModuleSelector);
-        $I->canSee('Go to Workspace Module', self::$topBarModuleSelector);
-        $I->click('Go to Workspace Module', self::$topBarModuleSelector);
+        $I->canSee('Workspaces Module', self::$topBarModuleSelector);
+        $I->click('Workspaces Module', self::$topBarModuleSelector);
 
         $I->comment('See the new page title in Workspace module');
         $I->switchToContentFrame();
diff --git a/typo3/sysext/opendocs/Resources/Private/Language/locallang.xlf b/typo3/sysext/opendocs/Resources/Private/Language/locallang.xlf
index f24a7333ae29..88d40b944ab7 100644
--- a/typo3/sysext/opendocs/Resources/Private/Language/locallang.xlf
+++ b/typo3/sysext/opendocs/Resources/Private/Language/locallang.xlf
@@ -3,17 +3,20 @@
 	<file source-language="en" datatype="plaintext" original="EXT:opendocs/Resources/Private/Language/locallang.xlf" date="2011-10-17T20:22:34Z" product-name="opendocs">
 		<header/>
 		<body>
-			<trans-unit id="toolbaritem" resname="toolbaritem">
-				<source>Open and Recently Used Documents</source>
+			<trans-unit id="toolbarItems.headline" resname="toolbarItems.headline">
+				<source>Open and recently used documents</source>
 			</trans-unit>
-			<trans-unit id="open_docs" resname="open_docs">
-				<source>Open Documents</source>
+			<trans-unit id="toolbarItems.openDocuments.headline" resname="toolbarItems.openDocuments.headline">
+				<source>Open documents</source>
 			</trans-unit>
-			<trans-unit id="recent_docs" resname="recent_docs">
-				<source>Recently Used Documents</source>
+			<trans-unit id="toolbarItems.openDocuments.emptyList" resname="toolbarItems.openDocuments.emptyList">
+				<source>There are currently no open documents.</source>
 			</trans-unit>
-			<trans-unit id="no_docs" resname="no_docs">
-				<source>There are no open documents at this time.</source>
+			<trans-unit id="toolbarItems.recentDocuments.headline" resname="toolbarItems.recentDocuments.headline">
+				<source>Recently used documents</source>
+			</trans-unit>
+			<trans-unit id="toolbarItems.recentDocuments.emptyList" resname="toolbarItems.recentDocuments.emptyList">
+				<source>No documents were used recently.</source>
 			</trans-unit>
 		</body>
 	</file>
diff --git a/typo3/sysext/opendocs/Resources/Private/Templates/ToolbarItems/DropDown.html b/typo3/sysext/opendocs/Resources/Private/Templates/ToolbarItems/DropDown.html
index 18e35e86fddc..0748caf85b68 100644
--- a/typo3/sysext/opendocs/Resources/Private/Templates/ToolbarItems/DropDown.html
+++ b/typo3/sysext/opendocs/Resources/Private/Templates/ToolbarItems/DropDown.html
@@ -5,68 +5,81 @@
     }"
 />
 
-<p class="h3 dropdown-headline">{f:translate(key: 'LLL:EXT:opendocs/Resources/Private/Language/locallang.xlf:toolbaritem')}</p>
-<f:if condition="{noDocs}">
-    <p class="dropdown-item-text"><f:translate key="LLL:EXT:opendocs/Resources/Private/Language/locallang.xlf:no_docs" /></p>
-</f:if>
+<p class="h3 dropdown-headline"><f:translate key="LLL:EXT:opendocs/Resources/Private/Language/locallang.xlf:toolbarItems.headline" /></p>
 
-<f:if condition="{noDocs}">
-    <f:else>
-        <f:if condition="{openDocuments}">
-            <hr class="dropdown-divider" aria-hidden="true">
-            <ul class="dropdown-list" data-open-docs="{openDocuments->f:count()}">
+<p class="h4 dropdown-headline"><f:translate key="LLL:EXT:opendocs/Resources/Private/Language/locallang.xlf:toolbarItems.openDocuments.headline" /></p>
+<f:if condition="{openDocuments}">
+    <f:then>
+        <ul class="dropdown-list" data-open-docs="{openDocuments->f:count()}">
+            <f:for each="{openDocuments}" as="openDocument">
                 <li>
-                    <p class="h3 dropdown-headline"><f:translate key="LLL:EXT:opendocs/Resources/Private/Language/locallang.xlf:open_docs" /></p>
-                    <a href="#" class="dropdown-item dropdown-item-action t3js-topbar-opendocs-close"
-                        title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.closeAllDocs')}">
+                    <a href="{openDocument.uri}" class="dropdown-item dropdown-item-title t3js-open-doc"
+                        data-pid="{openDocument.label}"
+                        title="{openDocument.label}">
+                        <span class="dropdown-item-columns">
+                            <span class="dropdown-item-column dropdown-item-column-icon">
+                                <core:iconForRecord table="{openDocument.table}" row="{openDocument.record}"/>
+                            </span>
+                            <span class="dropdown-item-column dropdown-item-column-title">
+                                {openDocument.label}
+                            </span>
+                        </span>
+                    </a>
+                    <a
+                        href="#"
+                        class="dropdown-item dropdown-item-action t3js-topbar-opendocs-close"
+                        data-opendocsidentifier="{openDocument.md5sum}"
+                        title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.closeDoc')}: {openDocument.label}"
+                        role="button"
+                    >
                         <core:icon identifier="actions-close" alternativeMarkupIdentifier="inline"/>
                     </a>
                 </li>
-                <f:for each="{openDocuments}" as="openDocument">
-                    <li>
-                        <a href="{openDocument.uri}" class="dropdown-item dropdown-item-title t3js-open-doc"
-                            data-pid="{openDocument.label}"
-                            title="{openDocument.label}">
-                            <span class="dropdown-item-columns">
-                                <span class="dropdown-item-column dropdown-item-column-icon">
-                                    <core:iconForRecord table="{openDocument.table}" row="{openDocument.record}"/>
-                                </span>
-                                <span class="dropdown-item-column dropdown-item-column-title">
-                                    {openDocument.label}
-                                </span>
+            </f:for>
+        </ul>
+        <div class="dropdown-item-text">
+            <a
+                href="#"
+                class="btn btn-sm btn-default t3js-topbar-opendocs-close"
+                role="button"
+            >
+                <core:icon identifier="actions-close" alternativeMarkupIdentifier="inline"/>
+                {f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.closeAllDocs')}
+            </a>
+        </div>
+    </f:then>
+    <f:else>
+        <p class="dropdown-item-text"><f:translate key="LLL:EXT:opendocs/Resources/Private/Language/locallang.xlf:toolbarItems.openDocuments.emptyList" /></p>
+    </f:else>
+</f:if>
+
+<hr class="dropdown-divider" aria-hidden="true">
+
+<p class="h4 dropdown-headline"><f:translate key="LLL:EXT:opendocs/Resources/Private/Language/locallang.xlf:toolbarItems.recentDocuments.headline" /></p>
+<f:if condition="{recentDocuments}">
+    <f:then>
+        <ul class="dropdown-list">
+            <f:for each="{recentDocuments}" as="recentDocument">
+                <li>
+                    <a href="{recentDocument.uri}" class="dropdown-item t3js-open-doc"
+                        data-pid="{recentDocument.pid}"
+                        title="{recentDocument.label}">
+                        <span class="dropdown-item-columns">
+                            <span class="dropdown-item-column dropdown-item-column-icon">
+                                <core:iconForRecord table="{recentDocument.table}" row="{recentDocument.record}"/>
                             </span>
-                        </a>
-                        <a href="#" class="dropdown-item dropdown-item-action t3js-topbar-opendocs-close"
-                            data-opendocsidentifier="{openDocument.md5sum}"
-                            title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.closeDoc')}: {openDocument.label}">
-                            <core:icon identifier="actions-close" alternativeMarkupIdentifier="inline"/>
-                        </a>
-                    </li>
-                </f:for>
-            </ul>
-        </f:if>
-        <f:if condition="{recentDocuments}">
-            <hr class="dropdown-divider" aria-hidden="true">
-            <p class="h4 dropdown-headline"><f:translate key="LLL:EXT:opendocs/Resources/Private/Language/locallang.xlf:recent_docs" /></p>
-            <ul class="dropdown-list">
-                <f:for each="{recentDocuments}" as="recentDocument">
-                    <li>
-                        <a href="{recentDocument.uri}" class="dropdown-item t3js-open-doc"
-                            data-pid="{recentDocument.pid}"
-                            title="{recentDocument.label}">
-                            <span class="dropdown-item-columns">
-                                <span class="dropdown-item-column dropdown-item-column-icon">
-                                    <core:iconForRecord table="{recentDocument.table}" row="{recentDocument.record}"/>
-                                </span>
-                                <span class="dropdown-item-column dropdown-item-column-title">
-                                    {recentDocument.label}
-                                </span>
+                            <span class="dropdown-item-column dropdown-item-column-title">
+                                {recentDocument.label}
                             </span>
-                        </a>
-                    </li>
-                </f:for>
-            </ul>
-        </f:if>
+                        </span>
+                    </a>
+                </li>
+            </f:for>
+        </ul>
+    </f:then>
+    <f:else>
+        <p class="dropdown-item-text"><f:translate key="LLL:EXT:opendocs/Resources/Private/Language/locallang.xlf:toolbarItems.recentDocuments.emptyList" /></p>
     </f:else>
 </f:if>
+
 </html>
diff --git a/typo3/sysext/workspaces/Resources/Private/Templates/ToolbarItems/DropDown.html b/typo3/sysext/workspaces/Resources/Private/Templates/ToolbarItems/DropDown.html
index 04cf19f654b6..33764f6ff0fe 100644
--- a/typo3/sysext/workspaces/Resources/Private/Templates/ToolbarItems/DropDown.html
+++ b/typo3/sysext/workspaces/Resources/Private/Templates/ToolbarItems/DropDown.html
@@ -1,39 +1,52 @@
 <html xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" data-namespace-typo3-fluid="true">
 
 <p class="h3 dropdown-headline"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.workspace" /></p>
-<ul class="dropdown-list">
-    <f:if condition="{topItem}">
-        <f:then>
-            <f:render section="workspaceItem" arguments="{item: topItem}" />
-        </f:then>
-        <f:else>
-            <li>
-                <f:comment>no items on top (= no workspace to work in)</f:comment>
-                <p class="dropdown-item-text">
-                    <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:bookmark_noWSfound" />
-                </p>
-            </li>
-        </f:else>
-    </f:if>
-    <f:if condition="{additionalItems}">
-        <f:for each="{additionalItems}" as="item">
-            <f:render section="workspaceItem" arguments="{item: item}" />
-        </f:for>
+<p class="dropdown-item-text">
+    <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.workspace.intro.text" />
+    <f:if condition="{showLinkToModule}">
+        <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.workspace.intro.link.description" />
+        <a href="#" target="list_frame" data-module="workspaces_admin" class="link-primary t3js-workspaces-modulelink">
+            <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.workspace.intro.link" />
+        </a>
     </f:if>
-</ul>
-
+</p>
 
-<f:if condition="{showLinkToModule}">
-    <hr class="dropdown-divider" aria-hidden="true">
-    <a href="#" target="list_frame" data-module="workspaces_admin" class="dropdown-item t3js-workspaces-modulelink">
-        <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:bookmark_workspace" />
-    </a>
+<f:if condition="{topItem} || {additionalItems}">
+    <f:then>
+        <ul class="dropdown-list">
+            <f:if condition="{topItem}">
+                <f:render section="workspaceItem" arguments="{item: topItem}" />
+            </f:if>
+            <f:if condition="{additionalItems}">
+                <f:for each="{additionalItems}" as="item">
+                    <f:render section="workspaceItem" arguments="{item: item}" />
+                </f:for>
+            </f:if>
+        </ul>
+    </f:then>
+    <f:else>
+        <f:comment><!-- No workspace to work in --></f:comment>
+        <hr class="dropdown-divider" aria-hidden="true">
+        <div class="dropdown-row">
+            <div>
+                <span class="text-danger">
+                    <core:icon identifier="actions-exclamation-circle-alt" />
+                </span>
+            </div>
+            <div>
+                <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:toolbarItems.workspace.noWorkspaceFound" />
+            </div>
+        </div>
+    </f:else>
 </f:if>
 
 <f:section name="workspaceItem">
     <li class="t3js-workspace-item">
         <a href="{item.link}" data-workspaceid="{item.workspaceId}" class="dropdown-item t3js-workspaces-switchlink {item.isActive ? 'active' : ''}">
             <span class="dropdown-item-columns">
+                <span class="dropdown-item-column dropdown-item-column-icon">
+                    <core:icon identifier="mimetypes-x-sys_workspace" size="small" />
+                </span>
                 <span class="dropdown-item-column dropdown-item-column-title">
                     {item.label -> f:format.htmlspecialchars()}
                 </span>
-- 
GitLab