SELF-Treffen in Mannheim 2025
SELFHTML wird 30 Jahre alt! → Veranstaltungs-Ankündigung.
HTML/Attribute/aria-checked
Aus SELFHTML-Wiki
< HTML | Attribute(Weitergeleitet von Aria-checked)
Das aria-checked-Attribut ist ein ARIA-Attribut, das den aktuellen „angekreuzten“ Zustand von Kontrollkästchen, Optionsfeldern und anderen Widgets anzeigt.
erlaubte Werte |
true / false / mixed /undefined |
---|---|
default-Wert | undefined |
erlaubt in | allen Elementen |
Beispiel
<span
role="checkbox"
id="checkBoxInput"
aria-checked="false"
tabindex="0"
aria-labelledby="chk15-label"></span>
<label id="chk15-label">Newsletter abonnieren</label>
Ein inhaltsleeres span-Element wird zu einer Checkbox umgebaut.
Empfehlung: Verwende nach Möglichkeit ein HTML <input>-Element mit type="checkbox" oder type="radio“, da diese eine eingebaute Semantik haben und keine ARIA-Attribute erfordern.
Siehe auch
Weblinks
- W3C: aria-checked
- MDN: aria-checked
Liste der HTML-Attribute
- Aria-Attribute
- aria-activedescendant
- aria-atomic
- aria-autocomplete
- aria-braillelabel
- aria-brailleroledescription
- aria-busy
- aria-checked
- aria-colcount
- aria-colindex
- aria-colindextext
- aria-colspan
- aria-controls
- aria-current
- aria-describedby
- aria-description
- aria-details
- aria-disabled
- aria-errormessage
- aria-expanded
- aria-flowto
- aria-haspopup
- aria-hidden
- aria-invalid
- aria-keyshortcuts
- aria-label
- aria-labelledby
- aria-level
- aria-live
- aria-modal
- aria-multiline
- aria-multiselectable
- aria-orientation
- aria-owns
- aria-placeholder
- aria-posinset
- aria-pressed
- aria-readonly
- aria-relevant
- aria-required
- aria-roledescription
- aria-rowcount
- aria-rowindex
- aria-rowindextext
- aria-rowspan
- aria-selected
- aria-setsize
- aria-sort
- aria-valuemax
- aria-valuemin
- aria-valuenow
- aria-valuetext
- Universalattribute
- Formular-Attribute
- Listen-Attribute
- Medien-Attribute
- Meta-Attribute
- Tabellen-Attribute
- Verweis-Attribute
- obsolet oder gelöscht