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 /core/src/OCP/accessibility.js | |
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 'core/src/OCP/accessibility.js')
-rw-r--r-- | core/src/OCP/accessibility.js | 13 |
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, } |