diff options
author | Julia Kirschenheuter <6078378+JuliaKirschenheuter@users.noreply.github.com> | 2023-03-08 08:08:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 08:08:25 +0100 |
commit | f1abecdf47e41aeb91b8ac4a9a03992c4b1803f8 (patch) | |
tree | 5663842ef7dbc384d2a67cd6e3b6657c8ac4ccfc /apps | |
parent | 5ce7336a1b459b07f16194380d17dc8d52389b58 (diff) | |
parent | 0cfbe54a5a391d3af6dd37902cda6b914f07480d (diff) | |
download | nextcloud-server-f1abecdf47e41aeb91b8ac4a9a03992c4b1803f8.tar.gz nextcloud-server-f1abecdf47e41aeb91b8ac4a9a03992c4b1803f8.zip |
Merge pull request #36640 from nextcloud/fix/35626-No_heading_nor_tab_index_for_settings_pages
Create headings for apps, users, settings pages
Diffstat (limited to 'apps')
4 files changed, 8 insertions, 4 deletions
diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php index a4addfc5b35..d0ed408df02 100644 --- a/apps/settings/lib/Controller/AppSettingsController.php +++ b/apps/settings/lib/Controller/AppSettingsController.php @@ -136,7 +136,7 @@ class AppSettingsController extends Controller { $params['bundles'] = $this->getBundles(); $this->navigationManager->setActiveEntry('core_apps'); - $templateResponse = new TemplateResponse('settings', 'settings-vue', ['serverData' => $params]); + $templateResponse = new TemplateResponse('settings', 'settings-vue', ['serverData' => $params, 'pageTitle' => $this->l10n->t('Apps')]); $policy = new ContentSecurityPolicy(); $policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com'); $templateResponse->setContentSecurityPolicy($policy); diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 217abf0e156..89a850c1980 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -277,7 +277,7 @@ class UsersController extends Controller { $serverData['newUserRequireEmail'] = $this->config->getAppValue('core', 'newUser.requireEmail', 'no') === 'yes'; $serverData['newUserSendEmail'] = $this->config->getAppValue('core', 'newUser.sendEmail', 'yes') === 'yes'; - return new TemplateResponse('settings', 'settings-vue', ['serverData' => $serverData]); + return new TemplateResponse('settings', 'settings-vue', ['serverData' => $serverData, 'pageTitle' => $this->l10n->t('Users')]); } /** diff --git a/apps/settings/src/router.js b/apps/settings/src/router.js index 863bd49c32d..cf842475c5d 100644 --- a/apps/settings/src/router.js +++ b/apps/settings/src/router.js @@ -27,6 +27,7 @@ import Router from 'vue-router' import { generateUrl } from '@nextcloud/router' import { APPS_SECTION_ENUM } from './constants/AppsConstants.js' import store from './store/index.js' +import { setPageHeading } from '../../../core/src/OCP/accessibility.js' // Dynamic loading const Users = () => import(/* webpackChunkName: 'settings-users' */'./views/Users') @@ -126,6 +127,7 @@ router.afterEach(async (to) => { const metaTitle = await to.meta.title?.(to) if (metaTitle) { document.title = `${metaTitle} - ${baseTitle}` + setPageHeading(metaTitle) } else { document.title = baseTitle } diff --git a/apps/settings/tests/Controller/AppSettingsControllerTest.php b/apps/settings/tests/Controller/AppSettingsControllerTest.php index 28d77dc3696..8d0dae223d3 100644 --- a/apps/settings/tests/Controller/AppSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AppSettingsControllerTest.php @@ -209,7 +209,8 @@ class AppSettingsControllerTest extends TestCase { 'appstoreEnabled' => true, 'bundles' => [], 'developerDocumentation' => '' - ] + ], + 'pageTitle' => 'Apps' ], 'user'); $expected->setContentSecurityPolicy($policy); @@ -243,7 +244,8 @@ class AppSettingsControllerTest extends TestCase { 'appstoreEnabled' => false, 'bundles' => [], 'developerDocumentation' => '' - ] + ], + 'pageTitle' => 'Apps' ], 'user'); $expected->setContentSecurityPolicy($policy); |