Change Proposal: Read-only styling for Switch, Checkbox, and Radio
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- react, typescript
- Bereich
- accessibility, frontend
Rechercherichtung
Start by reviewing issue #272 and PR #328 to understand the existing read-only treatment for text-like controls, then locate the Switch, Checkbox, and Radio implementations. Done means the three controls support the proposed read-only interface, remain focusable and announced appropriately, prevent changes, and have an agreed visual treatment with coverage for these behaviors.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What is being proposed?
A read-only variant for MuiSwitch, MuiCheckbox, and MuiRadio, distinct from disabled.
Why is this needed?
Follow-up from #272 / PR #328, which gave TextField/Select/Autocomplete a dedicated read-only look.
These three controls have no native readOnly support in MUI (unlike text-like inputs), and they currently have only disabled, which mutes the value and drops the control from the tab order even when the value itself still needs to be shown and announced, with no read-only treatment at all.
What will change?
- Behaviour: enforce read-only via controlled
checked+ no-oponChange, since nativereadonlyon checkbox/radio inputs doesn't block clicks - Accessibility:
aria-readonlyinstead ofaria-disabled, keeping the control focusable/announced - Visual: likely closer to full saturation than the muted
--ds-surface-readonlywash used for text inputs, since the value is meaningful and being displayed, not unavailable
Interface changes (if any)
<Switch readOnly checked={value} />
<Checkbox readOnly checked={value} />
<Radio readOnly checked={value} />
Breaking change?
- No
Next steps
A maintainer will review this issue.
If accepted, it will be marked as accepted and a PR may then be opened.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 9
- Forks
- 3
- Ø Merge
- 6 T. 7 Std.
- Gemergte PRs (30 T.)
- 20
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus DiamondLightSource/sci-react-ui
-
needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
DiamondLightSource/sci-react-ui#325 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
accepted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
DiamondLightSource/sci-react-ui#283 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
needs-triage
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 38/100
DiamondLightSource/sci-react-ui#332 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
needs-triage
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
DiamondLightSource/sci-react-ui#324 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
needs-triage
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 45/100
DiamondLightSource/sci-react-ui#280 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in DiamondLightSource/sci-react-ui
Ähnliche Issues
-
bug via-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
pingdotgg/t3code#14452 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
solana-foundation/program-examples#747 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 9 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
remotion-dev/remotion#11847 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
openwatersio/slackwater#355 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
melgarafael/DeskcommCRM#1998 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag