summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorjulia.kirschenheuter <julia.kirschenheuter@nextcloud.com>2023-02-08 15:40:41 +0100
committerjulia.kirschenheuter <julia.kirschenheuter@nextcloud.com>2023-03-09 13:14:48 +0100
commitf5ab3123dfe7cabb6ad6c5e64a75bec0e43e0cbb (patch)
treeeb6857a1dd278275daa1da69a247d64e9a5eec9d /core/src
parentd29551a46d379147c09af7251910765766bbf269 (diff)
downloadnextcloud-server-f5ab3123dfe7cabb6ad6c5e64a75bec0e43e0cbb.tar.gz
nextcloud-server-f5ab3123dfe7cabb6ad6c5e64a75bec0e43e0cbb.zip
Create headings for settings pages
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OCP/accessibility.js12
1 files changed, 12 insertions, 0 deletions
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,
}