From ba3306b497c272f9224e8dabfa862750ae0f9cdd Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 16 Mar 2022 17:44:40 -0400 Subject: [PATCH] improve accessibility in various examples --- docs/components/badge.md | 4 +-- docs/components/button-group.md | 22 +++++++------- docs/components/button.md | 14 +++++++-- docs/components/card.md | 2 +- docs/components/divider.md | 12 ++------ docs/components/icon.md | 2 +- docs/components/progress-bar.md | 8 ++--- docs/components/progress-ring.md | 8 ++--- docs/components/qr-code.md | 2 +- docs/components/radio-button.md | 42 +++++++++++++++++++++++++-- docs/components/responsive-media.md | 2 ++ docs/components/switch.md | 2 +- docs/components/tooltip.md | 2 +- docs/getting-started/form-controls.md | 2 +- 14 files changed, 81 insertions(+), 43 deletions(-) diff --git a/docs/components/badge.md b/docs/components/badge.md index 93123f6c7..ffbfb4c3f 100644 --- a/docs/components/badge.md +++ b/docs/components/badge.md @@ -185,9 +185,7 @@ const App = () => ( When including badges in menu items, use the `suffix` slot to make sure they're aligned correctly. ```html preview - + Messages Comments 4 Replies 12 diff --git a/docs/components/button-group.md b/docs/components/button-group.md index 6b415f88b..17e63b267 100644 --- a/docs/components/button-group.md +++ b/docs/components/button-group.md @@ -300,13 +300,15 @@ const App = () => ( ### Split Buttons -Create a split button using a button and a dropdown. +Create a split button using a button and a dropdown. Use a [visually hidden](/components/visually-hidden) label to ensure the dropdown is accessible to users with assistive devices. ```html preview Save - + + More options + Save Save as… @@ -384,34 +386,34 @@ Create interactive toolbars with button groups.
- + - + - + - + - + - + - + - +
diff --git a/docs/components/button.md b/docs/components/button.md index 48d60b79d..8e9c576ed 100644 --- a/docs/components/button.md +++ b/docs/components/button.md @@ -139,9 +139,17 @@ const App = () => ( Use the `circle` attribute to create circular icon buttons. ```html preview - - - + + + + + + + + + + + ``` ```jsx react diff --git a/docs/components/card.md b/docs/components/card.md index 4ecac5433..e3e731216 100644 --- a/docs/components/card.md +++ b/docs/components/card.md @@ -131,7 +131,7 @@ Headers can be used to display titles and more.
Header Title - +
This card has a header. You can put all sorts of things in it! diff --git a/docs/components/divider.md b/docs/components/divider.md index 94ad5bec6..38803224b 100644 --- a/docs/components/divider.md +++ b/docs/components/divider.md @@ -107,9 +107,7 @@ const App = () => ( Use dividers in [menus](/components/menu) to visually group menu items. ```html preview - + Option 1 Option 2 Option 3 @@ -124,13 +122,7 @@ Use dividers in [menus](/components/menu) to visually group menu items. import { SlDivider, SlMenu, SlMenuItem } from '@shoelace-style/shoelace/dist/react'; const App = () => ( - + Option 1 Option 2 Option 3 diff --git a/docs/components/icon.md b/docs/components/icon.md index 91d482a75..b655ea047 100644 --- a/docs/components/icon.md +++ b/docs/components/icon.md @@ -24,7 +24,7 @@ Click or tap on an icon below to copy its name and use it like this.
- + ## Examples diff --git a/docs/components/progress-bar.md b/docs/components/progress-bar.md index 39c4aad3a..7d94339dc 100644 --- a/docs/components/progress-bar.md +++ b/docs/components/progress-bar.md @@ -53,8 +53,8 @@ Use the default slot to show a value.
- - + +