Add tabindex to anchors to account for bad browser defaults. More cleanup.

This commit is contained in:
Greg Sarjeant 2025-06-21 17:44:55 -04:00
parent 4ce938e7bc
commit 33aee7ad71
2 changed files with 10 additions and 10 deletions

View File

@ -12,7 +12,7 @@
<span class="profile-greeting-content-mood"><?php echo Util::escape_html($user->mood) ?></span>
</span>
<?php if (Session::isLoggedIn()): ?>
<a tabindex="0" href="<?= $config->basePath ?>mood" class="change-mood">Change mood</a>
<a tabindex="0" href="<?= Util::escape_html($config->basePath) ?>mood" class="change-mood">Change mood</a>
<?php endif ?>
</dd>
<?php if (!empty($user->about)): ?>
@ -43,7 +43,7 @@
<?php endif; ?>
</aside>
<main id="ticks">
<h1 class="site-description"><?= $config->siteDescription ?></h1>
<h1 class="site-description"><?= Util::escape_html($config->siteDescription) ?></h1>
<?php echo $tickList ?>
</main>
</div>

View File

@ -1,25 +1,25 @@
<?php /** @var ConfigModel $config */ ?>
<?php /* https://www.w3schools.com/howto/howto_css_dropdown.asp */ ?>
<nav aria-label="Main navigation">
<a tabindex="0" href="<?= $config->basePath ?>">home</a>
<a tabindex="0" href="<?= Util::escape_html($config->basePath) ?>">home</a>
<details>
<summary aria-haspopup="true">feeds</summary>
<div class="dropdown-items">
<a tabindex="0" href="<?= $config->basePath ?>feed/rss">rss</a>
<a tabindex="0" href="<?= $config->basePath ?>feed/atom">atom</a>
<a tabindex="0" href="<?= Util::escape_html($config->basePath) ?>feed/rss">rss</a>
<a tabindex="0" href="<?= Util::escape_html($config->basePath) ?>feed/atom">atom</a>
</div>
</details>
<?php if (!Session::isLoggedIn()): ?>
<a tabindex="0" href="<?= $config->basePath ?>login">login</a>
<a tabindex="0" href="<?= Util::escape_html($config->basePath) ?>login">login</a>
<?php else: ?>
<details>
<summary aria-haspopup="true">admin</summary>
<div class="dropdown-items">
<a tabindex="0" href="<?= $config->basePath ?>admin">settings</a>
<a tabindex="0" href="<?= $config->basePath ?>admin/css">css</a>
<a tabindex="0" href="<?= $config->basePath ?>admin/emoji">emoji</a>
<a tabindex="0" href="<?= Util::escape_html($config->basePath) ?>admin">settings</a>
<a tabindex="0" href="<?= Util::escape_html($config->basePath) ?>admin/css">css</a>
<a tabindex="0" href="<?= Util::escape_html($config->basePath) ?>admin/emoji">emoji</a>
</div>
</details>
<a tabindex="0" href="<?= $config->basePath ?>logout">logout</a>
<a tabindex="0" href="<?= Util::escape_html($config->basePath) ?>logout">logout</a>
<?php endif; ?>
</nav>