Closed deleonio closed 7 months ago
FYI @Sommerli2, @fohi17, @cbraehmig, @ElVariablo, @sdvg, @laske185
Ich habe es mal prototypisch umgesetzt, man müsste natürlich das CSS noch für das Szenario anpassen.
Lösung:
Button
, Input
, Select
, Textaria
bleibt es bei disabled
- Vorteil: select
ist abgehaktAccordion
, Details
und Link
setzen wir aria-disabled="true" tabindex="-1"
und fangen das Event
abDemo:
PS: Leaving the comfort zone.
Ich finde den Weg gar nicht so schlecht, wenn die disabled-Varianten angeboten werden müssen. Zumindest mit dem Screenreader funktioniert das so Wunderbar.
Aus meiner Sicht muss die Doku dann eben die Probleme die man sich mit disabled-Elementen evtl. einhandelt genau beschreiben. Diese bestehen ja unabhängig von der Umsetzung mit aria-disabled und tabindex, wie dass der Kontrast zu gering ist (z.B. Buttons, Accordion), oder man nicht sieht was disabled ist (z.B. Details).
Ich finde den Lösungsansatz auch gut, so wie bisher umgesetzt: Wo möglich weiter disabled
verwenden, bei Spezialfällen wie Links auf aria-disabled
zurückgreifen 👍
Zur Implementierung habe ich einen Kommentar im PR hinterlassen.
Ich finde es auch gut, wenn man die Doku an dieser Stelle erweitert. Wenn man schon disabled Elemente verwenden will, welche Informationstragenden Inhalt bereitstellen, dann soll die Variante mit sichtbarer Beschriftung gewählt werden. Mit der Empfehlung nicht mit Disabled zu arbeiten.
Wir können das native
disabled
durcharia-disabled
ersetzen und damit mehr Komponenten mit deaktiviertem State ausstatten.Vorteile:
_hide-label
Nachteile:
Todos:
aria-disabled=true
, removedisabled
, settabindex="-1"
and cancelclick
-Eventaria-disabled=true
, removedisabled
, settabindex="-1"
and cancelclick
-Eventaria-disabled=true
, removedisabled
, settabindex="-1"
and cancelclick
-Eventaria-disabled=true
, removedisabled
, settabindex="-1"
and cancelclick
-Eventselect
wird nicht umgesetzt, weil die Klick- und Key-Aktion nicht abgebrochen werden kannSonderlocke - steht zur Diskussion?!
_hide-label
(nur hier ist ein Tooltip) aktiviert ist, den Fokus ermöglichen, sonsttabindex="-1"
verwendenDrafts:
Feedback: