https://pine32.be - © pine32.be 2024
Welcome! - 64 total posts. [RSS]
A funny little cycle. [LATEST]


Search 64 posts with 31 unique tags


#1710601100


[ webdev | mb_dev ]

Just found out a way to add hotkeys to a website without using JavaScript.

<a href="/auth" accesskey="a" aria-hidden="true" tabindex="-1"></a>
<a href="/media" accesskey="m" aria-hidden="true" tabindex="-1"></a>
<a href="/backup" accesskey="b" aria-hidden="true" tabindex="-1"></a>

aria-hidden="true" and tabindex="-1" are there to keep screen readers happy (and to keep my Google Lighthouse score high).

These hidden elements add alt + x hotkeys. It always surprises me how many things the HTML5 spec has integrated.

Shoutout to this article for the idea.