Gunnar Bittersmann: Advenskalender

Beitrag lesen

@@Rolf b

<p id="17" onclick="query(17)" class="linksbild" style="cursor:pointer;width:101px;height:101px;border-style:dotted"> 
<img src="/advent/17.gif" alt="Tag 17"> </p>

ist semantisch passend und vorbildliches HTML?!

Vor allem ist das unbenutzbar[1]. 💩

Semantisch passendes und vorbildliches CSS hätte das sichtbar gemacht:

[onclick]:not(a):not(button):not(input):not([tabindex="0"]) { outline: 0.5em solid red !important }

Die Registrierung von click-Events macht nur für solche Elemente Sinn, die auch per Tastatur ansteuerbar sind: Links, Buttons, Eingabefelder, Elemente mit tabindex="0".

LLAP 🖖

--
„Wenn du eine weise Antwort verlangst, musst du vernünftig fragen.“ —Johann Wolfgang von Goethe

  1. im Sinne von: nur in Ausnahmefällen benutzbar ↩︎