-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revise header icon button a11y, hide mmenu. (#43)
* Put icons into spans with aria-hidden="true" so screen readers won't read them. * Provide tooltips via title attribute. * Use sr-only spans for text labels. * Hide mmenu when not open so it doesn't peek behind main content.
- Loading branch information
Showing
4 changed files
with
47 additions
and
11 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
$translate = $this->plugin('translate'); | ||
$searchType = $this->siteSetting('search_type', 'sitewide'); | ||
switch ($searchType) { | ||
case 'cross-site': | ||
$searchAction = $this->url('site/cross-site-search', ['action' => 'results'], true); | ||
break; | ||
case 'sitewide': | ||
default: | ||
$searchAction = $this->url('site/resource', ['controller' => 'index', 'action' => 'search'], true); | ||
} | ||
$searchValue = $this->escapeHtml($this->params()->fromQuery('fulltext_search', '')); | ||
?> | ||
|
||
<form action="<?php echo $this->escapeHtml($searchAction); ?>" id="search-form"> | ||
<input type="text" name="fulltext_search" value="<?php echo $searchValue; ?>" | ||
placeholder="<?php echo $translate('Search'); ?>" | ||
aria-label="<?php echo $translate('Search'); ?>"> | ||
<button type="submit" title="<?php echo $translate('Search'); ?>"><span class="sr-only"><?php echo $translate('Search'); ?></span><span class="icon" aria-hidden="true"></span></button> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters