From f5ab3123dfe7cabb6ad6c5e64a75bec0e43e0cbb Mon Sep 17 00:00:00 2001 From: "julia.kirschenheuter" Date: Wed, 8 Feb 2023 15:40:41 +0100 Subject: Create headings for settings pages Signed-off-by: julia.kirschenheuter --- core/src/OCP/accessibility.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/src') diff --git a/core/src/OCP/accessibility.js b/core/src/OCP/accessibility.js index 3839509228f..72bd8a70582 100644 --- a/core/src/OCP/accessibility.js +++ b/core/src/OCP/accessibility.js @@ -22,6 +22,17 @@ import { loadState } from '@nextcloud/initial-state' +/** + * Set the page heading + * + * @param {string} heading page title from the history api + */ +export function setPageHeading(heading) { + const headingEl = document.getElementById('page-heading-level-1') + if (headingEl) { + headingEl.textContent = heading + } +} export default { /** * @return {boolean} Whether the user opted-out of shortcuts so that they should not be registered @@ -29,4 +40,5 @@ export default { disableKeyboardShortcuts() { return loadState('theming', 'shortcutsDisabled', false) }, + setPageHeading, } -- cgit v1.2.3