- 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:
Ty Clifford
2026-07-05 23:43:26 -04:00
parent 75d38d4eb8
commit 798ea7c649
2 changed files with 4 additions and 14 deletions
-9
View File
@@ -39,15 +39,6 @@
box-sizing: border-box; box-sizing: border-box;
} }
.sr-only {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
}
html { html {
min-height: 100%; min-height: 100%;
} }
+4 -5
View File
@@ -80,8 +80,7 @@ $renderPagination = static function (array $pagination, callable $url): void { ?
</nav> </nav>
<form class="search-form" action="<?= View::url('search') ?>" method="get" role="search" aria-label="Site search"> <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" aria-label="Search posts and pages">
<input id="site-search" type="search" name="q" value="<?= View::e($search_query ?? '') ?>" placeholder="Search" autocomplete="off">
<button type="submit" aria-label="Search">Go</button> <button type="submit" aria-label="Search">Go</button>
</form> </form>
@@ -106,8 +105,7 @@ $renderPagination = static function (array $pagination, callable $url): void { ?
</header> </header>
<?php if (($search_query ?? null) !== null): ?> <?php if (($search_query ?? null) !== null): ?>
<form class="wide-search" action="<?= View::url('search') ?>" method="get" role="search" aria-label="Search archive"> <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" autocomplete="off" aria-label="Search posts and pages">
<input id="archive-search" type="search" name="q" value="<?= View::e($search_query) ?>" placeholder="Search posts and pages" autocomplete="off">
<button type="submit">Search</button> <button type="submit">Search</button>
</form> </form>
<?php endif; ?> <?php endif; ?>
@@ -195,11 +193,12 @@ $renderPagination = static function (array $pagination, callable $url): void { ?
<?php foreach ($social as $network => $entry): ?> <?php foreach ($social as $network => $entry): ?>
<?php <?php
$socialUrl = (string) ($entry['url'] ?? '#'); $socialUrl = (string) ($entry['url'] ?? '#');
$socialLabel = (string) ($entry['label'] ?? $network);
if (str_starts_with($socialUrl, '/') && !str_starts_with($socialUrl, '//')) { if (str_starts_with($socialUrl, '/') && !str_starts_with($socialUrl, '//')) {
$socialUrl = View::url(ltrim($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; ?> <?php endforeach; ?>
</div> </div>
</section> </section>