frankx: semantisch sinvoller Tag für Fehlermeldungen

Beitrag lesen

Hellihello,

den Hinweis auf Microformate gab es ja schon und die Nutzung des class-Attributes. <ul class="menu"> macht genausviel Sinn wie <p class="error"> oder auch <ul class="error_messages">. Auch im Hinblick auf Accessibility/Barrierefreiheit (vergleichbar mit dem name-Attribut in einem Frameset). Bei raschem googlen fand ich http://juicystudio.com/article/wai-aria-in-html.php#docsemantics. Darin: "The class attribute accepts a space separated list of class names. To specify role and state information in the class attribute, a class name of axs is used — the values that follow the class name axs are the role and states for the control." "The technique works by specifying role and state information in the class attribute, as the class attribute applies to all elements in the strict doctype, except the base, head, html, meta, param, script, style, and title elements."

Das class-Attribut erlaubt ja eben auch Mehrfachzuordnungen: <p class="error system">Datenbank nicht verfügbar</p> oder <p class="error user">Passwort falsch</p>.

Gruß,

frankx