Add skip content buttons to the public page layout

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2022-07-18 18:00:22 +02:00
parent d5437e2a30
commit e3dc796e5d
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF
2 changed files with 7 additions and 2 deletions

View file

@ -31,6 +31,11 @@
<?php foreach ($_['initialStates'] as $app => $initialState) { ?>
<input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
<?php }?>
<div id="skip-actions">
<?php if ($_['id-app-content'] !== null) { ?><a href="<?php p($_['id-app-content']); ?>" class="button primary skip-navigation skip-content"><?php p($l->t('Skip to main content')); ?></a><?php } ?>
<?php if ($_['id-app-navigation'] !== null) { ?><a href="<?php p($_['id-app-navigation']); ?>" class="button primary skip-navigation"><?php p($l->t('Skip to navigation of app')); ?></a><?php } ?>
</div>
<div id="notification-container">
<div id="notification"></div>
</div>

View file

@ -282,8 +282,8 @@ class TemplateLayout extends \OC_Template {
$this->assign('initialStates', $this->initialState->getInitialStates());
$this->assign('id-app-content', '#app-content');
$this->assign('id-app-navigation', '#app-navigation');
$this->assign('id-app-content', $renderAs === TemplateResponse::RENDER_AS_USER ? '#app-content' : '#content');
$this->assign('id-app-navigation', $renderAs === TemplateResponse::RENDER_AS_USER ? '#app-navigation' : null);
}
/**