aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Settings
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2021-11-24 14:08:16 +0100
committerCarl Schwan <carl@carlschwan.eu>2022-05-16 22:47:37 +0200
commit046d5451b15d46581cde846676e0b6d631fedbb7 (patch)
treeab0c48dc23940de1b6edbff9f2b1243e1c911b19 /lib/private/Settings
parentab0548e4edb1d2cf47718f752272d68aa6be07e2 (diff)
downloadnextcloud-server-046d5451b15d46581cde846676e0b6d631fedbb7.tar.gz
nextcloud-server-046d5451b15d46581cde846676e0b6d631fedbb7.zip
Improve accessibility of the title of the settings
Before every setting page had the same title and this is causing issues for screenreaders since they can't differenciate the title of page. Now a new variable is available for apps to declare the page subtitle. This new variable is implemented for the settings app and while at it I added a bit more type hinting to the stuff I touched :) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/Settings')
-rw-r--r--lib/private/Settings/Manager.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php
index 84fbf9426b0..ed331c59725 100644
--- a/lib/private/Settings/Manager.php
+++ b/lib/private/Settings/Manager.php
@@ -145,6 +145,13 @@ class Manager implements IManager {
return $this->sections[$type];
}
+ public function getSection(string $type, string $sectionId): ?IIconSection {
+ if (isset($this->sections[$type]) && isset($this->sections[$type][$sectionId])) {
+ return $this->sections[$type][$sectionId];
+ }
+ return null;
+ }
+
protected function isKnownDuplicateSectionId(string $sectionID): bool {
return in_array($sectionID, [
'connected-accounts',