Gunnar Bittersmann: Verstädnisfrage zur link-Aneisung

Beitrag lesen

@@Gunnar Bittersmann

Einen Fehler.

Da soll ein JavaScript ausgeführt werden – und nicht zum Seitenanfang gesprungen werden. Das a-Element ist dafür falsch; dafür sollte ein button verwendet werden.

“An example is a link that has been repurposed to be a button. Ignoring the fact this is a lousy design pattern to use in the first place, it’s surprisingly common out in the wild.
“There is an important difference between a link and a button: a link can be activated using the enter key, and a button can be activated using the enter or space key. When you repurpose a link to be a button, the additional keyboard support must be provided using JavaScript.”
—Léonie Watson, Short note on progressive ARIA

LLAP 🖖

--
„Wer durch Wissen und Erfahrung der Klügere ist, der sollte nicht nachgeben. Und nicht aufgeben.“ —Kurt Weidemann