- I removed the visible helper copy from the CMS:
Search fields now show only Search, with aria-label="Search posts and pages" for screen readers. Social links now show only GitHub, Mastodon, RSS, with “opens in a new tab” moved into aria-label. Removed the now-unused .sr-only CSS rule. Changed [layout.php](/Users/tyemeclifford/Documents/GH/blog/themes/neon/layout.php) and [style.css](/Users/tyemeclifford/Documents/GH/blog/themes/neon/assets/style.css).
This commit is contained in:
@@ -39,15 +39,6 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
html {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
@@ -80,8 +80,7 @@ $renderPagination = static function (array $pagination, callable $url): void { ?
|
||||
</nav>
|
||||
|
||||
<form class="search-form" action="<?= View::url('search') ?>" method="get" role="search" aria-label="Site search">
|
||||
<label class="sr-only" for="site-search">Search posts and pages</label>
|
||||
<input id="site-search" type="search" name="q" value="<?= View::e($search_query ?? '') ?>" placeholder="Search" autocomplete="off">
|
||||
<input id="site-search" type="search" name="q" value="<?= View::e($search_query ?? '') ?>" placeholder="Search" autocomplete="off" aria-label="Search posts and pages">
|
||||
<button type="submit" aria-label="Search">Go</button>
|
||||
</form>
|
||||
|
||||
@@ -106,8 +105,7 @@ $renderPagination = static function (array $pagination, callable $url): void { ?
|
||||
</header>
|
||||
<?php if (($search_query ?? null) !== null): ?>
|
||||
<form class="wide-search" action="<?= View::url('search') ?>" method="get" role="search" aria-label="Search archive">
|
||||
<label class="sr-only" for="archive-search">Search posts and pages</label>
|
||||
<input id="archive-search" type="search" name="q" value="<?= View::e($search_query) ?>" placeholder="Search posts and pages" autocomplete="off">
|
||||
<input id="archive-search" type="search" name="q" value="<?= View::e($search_query) ?>" placeholder="Search" autocomplete="off" aria-label="Search posts and pages">
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
@@ -195,11 +193,12 @@ $renderPagination = static function (array $pagination, callable $url): void { ?
|
||||
<?php foreach ($social as $network => $entry): ?>
|
||||
<?php
|
||||
$socialUrl = (string) ($entry['url'] ?? '#');
|
||||
$socialLabel = (string) ($entry['label'] ?? $network);
|
||||
if (str_starts_with($socialUrl, '/') && !str_starts_with($socialUrl, '//')) {
|
||||
$socialUrl = View::url(ltrim($socialUrl, '/'));
|
||||
}
|
||||
?>
|
||||
<a href="<?= View::e($socialUrl) ?>" rel="me noopener" target="_blank"><?= View::e($entry['label'] ?? $network) ?><span class="sr-only"> opens in a new tab</span></a>
|
||||
<a href="<?= View::e($socialUrl) ?>" rel="me noopener" target="_blank" aria-label="<?= View::e($socialLabel) ?> opens in a new tab"><?= View::e($socialLabel) ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user