diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-01-26 16:44:53 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-01-26 16:44:53 +0000 |
| commit | df9933c5b019e1bfc9640a878a9061bacadc9cc5 (patch) | |
| tree | 744fcb2c4f98d201990985e06668300ffc50241d /library | |
| parent | 8895087e365acdacf9b3f1d958b816ea13eacbc2 (diff) | |
| download | webtrees-df9933c5b019e1bfc9640a878a9061bacadc9cc5.tar.gz webtrees-df9933c5b019e1bfc9640a878a9061bacadc9cc5.tar.bz2 webtrees-df9933c5b019e1bfc9640a878a9061bacadc9cc5.zip | |
Add a11y links for keyboard users. Rename 'admin pages' to 'Control panel'
Diffstat (limited to 'library')
| -rw-r--r-- | library/WT/Theme/Administration.php | 8 | ||||
| -rw-r--r-- | library/WT/Theme/BaseTheme.php | 20 | ||||
| -rw-r--r-- | library/WT/Theme/Colors.php | 1 | ||||
| -rw-r--r-- | library/WT/Theme/Fab.php | 1 | ||||
| -rw-r--r-- | library/WT/Theme/Minimal.php | 1 | ||||
| -rw-r--r-- | library/WT/Theme/Xenea.php | 1 |
6 files changed, 28 insertions, 4 deletions
diff --git a/library/WT/Theme/Administration.php b/library/WT/Theme/Administration.php index 47fc4078ed..851a615999 100644 --- a/library/WT/Theme/Administration.php +++ b/library/WT/Theme/Administration.php @@ -49,7 +49,9 @@ class Administration extends BaseTheme { /** {@inheritdoc} */ protected function headerContent() { - return $this->secondaryMenuContainer($this->secondaryMenu()); + return + $this->accessibilityLinks() . + $this->secondaryMenuContainer($this->secondaryMenu()); } /** {@inheritdoc} */ @@ -62,7 +64,7 @@ class Administration extends BaseTheme { * @return WT_Menu */ protected function menuAdminSite() { - return new WT_Menu(/* I18N: Menu entry*/ WT_I18N::translate('webtrees'), '#', '', '', array( + return new WT_Menu(/* I18N: Menu entry*/ WT_I18N::translate('Server'), '#', '', '', array( new WT_Menu(/* I18N: Menu entry */ WT_I18N::translate('Site preferences'), 'admin_site_config.php?action=site'), new WT_Menu(/* I18N: Menu entry */ WT_I18N::translate('Sending email'), 'admin_site_config.php?action=email'), new WT_Menu(/* I18N: Menu entry */ WT_I18N::translate('Login and registration'), 'admin_site_config.php?action=login'), @@ -154,7 +156,7 @@ class Administration extends BaseTheme { '<span class="icon-bar"></span>' . '<span class="icon-bar"></span>' . '</button>' . - //'<a class="navbar-brand" href="index.php">' . WT_WEBTREES . '</a>' . + '<a class="navbar-brand" href="admin.php">' . WT_I18N::translate('Control panel') . '</a>' . '</div>' . '<div class="collapse navbar-collapse" id="primary-navbar-collapse">' . '<ul class="nav navbar-nav">' . diff --git a/library/WT/Theme/BaseTheme.php b/library/WT/Theme/BaseTheme.php index 7bf386222e..132b17a7b5 100644 --- a/library/WT/Theme/BaseTheme.php +++ b/library/WT/Theme/BaseTheme.php @@ -62,6 +62,23 @@ abstract class BaseTheme { } /** + * Create accessibility links for the header. + * + * "Skip to content" allows keyboard only users to navigate over the headers without + * pressing TAB many times. + * + * @return string + */ + public function accessibilityLinks() { + return + '<div class="accessibility-links">' . + '<a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content">' . + /* I18N: Skip over the headers and menus, to the main content of the page */ WT_I18N::translate('Skip to content') . + '</a>' . + '</div>'; + } + + /** * Create the top of the <body>. * * @return string @@ -426,6 +443,7 @@ abstract class BaseTheme { */ protected function headerContent() { return + //$this->accessibilityLinks() . $this->logoHeader() . $this->secondaryMenuContainer($this->secondaryMenu()) . $this->formatTreeTitle() . @@ -1294,7 +1312,7 @@ abstract class BaseTheme { } if (WT_USER_GEDCOM_ADMIN) { - $menu->addSubmenu(new WT_Menu(WT_I18N::translate('Administration'), 'admin.php', 'menu-admin')); + $menu->addSubmenu(new WT_Menu(WT_I18N::translate('Control panel'), 'admin.php', 'menu-admin')); } return $menu; diff --git a/library/WT/Theme/Colors.php b/library/WT/Theme/Colors.php index de7d683a35..883c444e70 100644 --- a/library/WT/Theme/Colors.php +++ b/library/WT/Theme/Colors.php @@ -53,6 +53,7 @@ class Colors extends Clouds { /** {@inheritdoc} */ protected function headerContent() { return + //$this->accessibilityLinks() . $this->formatTreeTitle() . $this->formatSecondaryMenu(); } diff --git a/library/WT/Theme/Fab.php b/library/WT/Theme/Fab.php index 07e19763e5..281e484dcd 100644 --- a/library/WT/Theme/Fab.php +++ b/library/WT/Theme/Fab.php @@ -54,6 +54,7 @@ class Fab extends BaseTheme { /** {@inheritdoc} */ protected function headerContent() { return + //$this->accessibilityLinks() . $this->formatTreeTitle() . $this->formatSecondaryMenu(); } diff --git a/library/WT/Theme/Minimal.php b/library/WT/Theme/Minimal.php index b1beddf8c4..1fa5467da0 100644 --- a/library/WT/Theme/Minimal.php +++ b/library/WT/Theme/Minimal.php @@ -59,6 +59,7 @@ class Minimal extends BaseTheme { /** {@inheritdoc} */ protected function headerContent() { return + //$this->accessibilityLinks() . $this->formatTreeTitle() . $this->formatSecondaryMenu(); } diff --git a/library/WT/Theme/Xenea.php b/library/WT/Theme/Xenea.php index f15e4eb522..3fe31252a2 100644 --- a/library/WT/Theme/Xenea.php +++ b/library/WT/Theme/Xenea.php @@ -50,6 +50,7 @@ class Xenea extends BaseTheme { /** {@inheritdoc} */ protected function headerContent() { return + //$this->accessibilityLinks() . '<div class="header-upper">' . $this->formatTreeTitle() . $this->formQuickSearch() . |
