diff --git a/CHANGELOG-WIP.md b/CHANGELOG-WIP.md index 8494820f7a4..ed1aec51abe 100644 --- a/CHANGELOG-WIP.md +++ b/CHANGELOG-WIP.md @@ -30,6 +30,8 @@ - The accessible name of “Select site” buttons is now translated to the current language. - Improved the accessibility of two-step verification steps on the control panel login screen. ([#15145](https://github.com/craftcms/cms/pull/15145)) - Improved the accessibility of global nav items with subnavs. ([#15006](https://github.com/craftcms/cms/issues/15006)) +- The secondary nav is now kept open during source selection for mobile viewports, preventing focus from being dropped. ([#14946](https://github.com/craftcms/cms/pull/14946)) +- User edit screens’ document titles have been updated to describe the page purpose. ([#14946](https://github.com/craftcms/cms/pull/14946)) ### Administration - Added the `--format` option to the `db/backup` and `db/restore` commands for PostgreSQL installs. ([#14931](https://github.com/craftcms/cms/pull/14931)) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f32941ab25..7b7481c0e8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - Matrix fields in cards view and Addresses fields now show which nested entries/addresses contain validation errors. ([#15161](https://github.com/craftcms/cms/issues/15161)) - Improved the accessibility of two-step verification steps on the control panel login screen. ([#15145](https://github.com/craftcms/cms/pull/15145)) - Improved the accessibility of global nav items with subnavs. ([#15006](https://github.com/craftcms/cms/issues/15006)) +- The secondary nav is now kept open during source selection for mobile viewports, preventing focus from being dropped. ([#14946](https://github.com/craftcms/cms/pull/14946)) +- User edit screens’ document titles have been updated to describe the page purpose. ([#14946](https://github.com/craftcms/cms/pull/14946)) - Fixed an error that could occur if a Local filesystem wasn’t configured with a base path. - Fixed a bug where some entries could be missing content after upgrading to Craft 5. ([#15150](https://github.com/craftcms/cms/issues/15150)) - Fixed a bug where it wasn’t always possible to add new entries to Matrix fields in inline-editable blocks view, if the field’s Max Entries setting had been reached before page load. ([#15158](https://github.com/craftcms/cms/issues/15158)) diff --git a/src/controllers/EditUserTrait.php b/src/controllers/EditUserTrait.php index 6513bcf2fb8..739b7b05e9b 100644 --- a/src/controllers/EditUserTrait.php +++ b/src/controllers/EditUserTrait.php @@ -122,11 +122,19 @@ protected function asEditUserScreen(User $user, string $screen): Response throw new ForbiddenHttpException('User not authorized to perform this action.'); } + $pageName = $screens[$screen]["label"]; $response = $this->asCpScreen(); if ($user->getIsCurrent()) { $response->title(Craft::t('app', 'My Account')); + $response->docTitle($pageName); } else { - $response->title($user->getUiLabel()); + $username = $user->getUiLabel(); + $extendedTitle = Craft::t('app', 'User {page}', [ + 'page' => $pageName, + ]); + $docTitle = "$username - $extendedTitle"; + $response->title($username); + $response->docTitle($docTitle); } $navItems = []; diff --git a/src/templates/_layouts/cp.twig b/src/templates/_layouts/cp.twig index 47a8599d238..8cfe4063d8f 100644 --- a/src/templates/_layouts/cp.twig +++ b/src/templates/_layouts/cp.twig @@ -248,7 +248,7 @@ history.replaceState(undefined, undefined, window.location.href.match(/^[^#]*/)[ aria-controls="sidebar-container" aria-expanded="false" > - + {{ 'Show sidebar'|t('app') }}