summaryrefslogtreecommitdiffstats
path: root/core/src/OCP
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-07 17:51:19 +0100
commit0cfbe54a5a391d3af6dd37902cda6b914f07480d (patch)
tree200ca74a837b5b1a1eb5001130a7341d7ff28234 /core/src/OCP
parent55db9780900a848d92af16d4ee1e762a1bfa33b2 (diff)
downloadnextcloud-server-0cfbe54a5a391d3af6dd37902cda6b914f07480d.tar.gz
nextcloud-server-0cfbe54a5a391d3af6dd37902cda6b914f07480d.zip
Create headings for settings pages
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Diffstat (limited to 'core/src/OCP')
-rw-r--r--core/src/OCP/accessibility.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/src/OCP/accessibility.js b/core/src/OCP/accessibility.js
index 3839509228f..d318d3497c4 100644
--- a/core/src/OCP/accessibility.js
+++ b/core/src/OCP/accessibility.js
@@ -22,6 +22,18 @@
import { loadState } from '@nextcloud/initial-state'
+/**
+ * Set the page heading
+ *
+ * @param {string} heading page title from the history api
+ * @since 27.0.0
+ */
+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 +41,5 @@ export default {
disableKeyboardShortcuts() {
return loadState('theming', 'shortcutsDisabled', false)
},
+ setPageHeading,
}