aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/templates
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-08-31 11:57:31 +0200
committerGitHub <noreply@github.com>2022-08-31 11:57:31 +0200
commit809f448ef7ee58980c56bb70a48495efd1f26894 (patch)
tree41d7afd861b9836dc0ae29f97ab84d62fe2ef4fe /apps/settings/templates
parent23bb4f16f9056e7a79116129c7de5b59cf84f8be (diff)
parentcc53efe4dd8c962a0900582c1e919a8f8182c183 (diff)
downloadnextcloud-server-809f448ef7ee58980c56bb70a48495efd1f26894.tar.gz
nextcloud-server-809f448ef7ee58980c56bb70a48495efd1f26894.zip
Merge pull request #33746 from nextcloud/a11y/33739/fix-legacy-nav
Add a11y attributes for legacy app navigation
Diffstat (limited to 'apps/settings/templates')
-rw-r--r--apps/settings/templates/help.php6
-rw-r--r--apps/settings/templates/settings/frame.php12
2 files changed, 8 insertions, 10 deletions
diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php
index 6450b3a36ec..763bc430133 100644
--- a/apps/settings/templates/help.php
+++ b/apps/settings/templates/help.php
@@ -1,12 +1,12 @@
<?php
\OC_Util::addStyle('settings', 'help');
?>
-<div id="app-navigation">
+<div id="app-navigation" role="navigation">
<ul>
<li>
<a class="icon-user <?php if ($_['mode'] === 'user') {
p('active');
-} ?>"
+} ?>" <?php if ($_['mode'] === 'user') { print_unescaped('aria-current="page"'); } ?>
href="<?php print_unescaped($_['urlUserDocs']); ?>">
<span class="help-list__text">
<?php p($l->t('User documentation')); ?>
@@ -17,7 +17,7 @@
<li>
<a class="icon-user-admin <?php if ($_['mode'] === 'admin') {
p('active');
-} ?>"
+} ?>" <?php if ($_['mode'] === 'admin') { print_unescaped('aria-current="page"'); } ?>
href="<?php print_unescaped($_['urlAdminDocs']); ?>">
<span class="help-list__text">
<?php p($l->t('Administrator documentation')); ?>
diff --git a/apps/settings/templates/settings/frame.php b/apps/settings/templates/settings/frame.php
index 6d017f07671..c388b03e191 100644
--- a/apps/settings/templates/settings/frame.php
+++ b/apps/settings/templates/settings/frame.php
@@ -29,7 +29,7 @@ script('files', 'jquery.fileupload');
?>
-<div id="app-navigation">
+<div id="app-navigation" role="navigation">
<ul>
<?php if (!empty($_['forms']['admin'])) { ?>
<li class="app-navigation-caption"><?php p($l->t('Personal')); ?></li>
@@ -39,10 +39,9 @@ script('files', 'jquery.fileupload');
if (isset($form['anchor'])) {
$anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.PersonalSettings.index', ['section' => $form['anchor']]);
$class = 'nav-icon-' . $form['anchor'];
- $sectionName = $form['section-name'];
- $active = $form['active'] ? ' class="active"' : ''; ?>
+ $sectionName = $form['section-name']; ?>
<li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?>>
- <a href="<?php p($anchor); ?>">
+ <a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>>
<?php if (!empty($form['icon'])) { ?>
<img alt="" src="<?php print_unescaped($form['icon']); ?>">
<span><?php p($form['section-name']); ?></span>
@@ -66,10 +65,9 @@ script('files', 'jquery.fileupload');
if (isset($form['anchor'])) {
$anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]);
$class = 'nav-icon-' . $form['anchor'];
- $sectionName = $form['section-name'];
- $active = $form['active'] ? ' class="active"' : ''; ?>
+ $sectionName = $form['section-name']; ?>
<li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?>>
- <a href="<?php p($anchor); ?>">
+ <a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>>
<?php if (!empty($form['icon'])) { ?>
<img alt="" src="<?php print_unescaped($form['icon']); ?>">
<span><?php p($form['section-name']); ?></span>