From 3d4052bf1774bd9d59e047c274ae1f1e277fa178 Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Tue, 20 Jan 2026 15:23:14 +0900 Subject: [PATCH] docs: add role="switch" to switches `role="switch"` is automatically added to checkboxes with the switch attribute in Safari, but we still need to add `role="switch"` for Chromium and Firefox etc, --- .../shortcodes/StepperPlayground.astro | 2 +- site/src/content/docs/forms/switch.mdx | 16 ++++++++-------- site/src/content/docs/getting-started/rtl.mdx | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/site/src/components/shortcodes/StepperPlayground.astro b/site/src/components/shortcodes/StepperPlayground.astro index 57ebef4c7b..e9b952af31 100644 --- a/site/src/components/shortcodes/StepperPlayground.astro +++ b/site/src/components/shortcodes/StepperPlayground.astro @@ -134,7 +134,7 @@ const stepCounts = [3, 4, 5, 6]
- +
diff --git a/site/src/content/docs/forms/switch.mdx b/site/src/content/docs/forms/switch.mdx index 4112b91b6d..1f8a9a42f8 100644 --- a/site/src/content/docs/forms/switch.mdx +++ b/site/src/content/docs/forms/switch.mdx @@ -15,7 +15,7 @@ Switches work by layering an invisible checkbox over the custom switch indicator Switches also include the `switch` attribute for browsers that support it. This provides haptic feedback when toggling the switch. - + `} /> ## Label @@ -26,14 +26,14 @@ Consider margin utilities for additional spacing, and flex utilities for alignme
- +
- +
`} /> @@ -44,7 +44,7 @@ Modify the appearance of checked checkboxes by adding the `.checked-{color}` cla `
- +
`)} /> @@ -55,7 +55,7 @@ Add the `disabled` attribute and the associated `