You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/toggle-switch-button/accessibility.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ documentation: ug
9
9
10
10
# Accessibility in Blazor Toggle Switch Button Component
11
11
12
-
The Blazor Toggle Switch Button component followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility.
12
+
The Blazor Toggle Switch Button component follows accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility.
13
13
14
14
The accessibility compliance for the Blazor Toggle Switch Button component is outlined below.
15
15
@@ -38,24 +38,24 @@ The accessibility compliance for the Blazor Toggle Switch Button component is ou
38
38
39
39
## WAI-ARIA attributes
40
40
41
-
The Blazor Toggle Switch Button component followed the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/switch/)patterns to meet the accessibility. The following ARIA attributes are used in the Blazor Toggle Switch Button component:
41
+
The Blazor Toggle Switch Button component follows the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/switch/)pattern to meet accessibility requirements. The following ARIA attributes are used in the Blazor Toggle Switch Button component. The component uses the switch role and reflects its state to assistive technologies. Ensure a clear, accessible label is provided via visible text, `aria-label`, or `aria-labelledby` as appropriate.
42
42
43
43
| Attributes | Purpose |
44
44
| --- | --- |
45
-
|`role`|Indicates the Toggle Switch Button component. |
46
-
|`aria-disabled`| Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. |
45
+
|`role`|Identifies the element as a switch control. |
46
+
|`aria-disabled`| Indicates that the element is disabled and is not operable. |
47
47
48
48
## Keyboard interaction
49
49
50
-
The Blazor Toggle Switch Button component followed the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/switch/#keyboardinteraction) guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Blazor Toggle Switch Button component.
50
+
The Blazor Toggle Switch Button component follows the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/switch/#keyboardinteraction) guideline, making it usable for people who rely on assistive technologies (AT) and keyboard navigation. The following keyboard shortcuts are supported.
51
51
52
52
| Windows | Mac | Actions |
53
53
| --- | --- | --- |
54
-
| <kbd>Space</kbd> | <kbd>space</kbd> | When the Toggle Switch Button has focus, pressing the Space key changes the state of the Toggle Switch Button. |
54
+
| <kbd>Space</kbd> | <kbd>Space</kbd> | When the toggle switch has focus, pressing Space toggles the switch state. |
55
55
56
56
## Ensuring accessibility
57
57
58
-
The Blazor Toggle Switch Button component's accessibility levels are ensured through an [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) with playwright tests.
58
+
The Blazor Toggle Switch Button component’s accessibility levels are validated using [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) with Playwright tests.
59
59
60
60
The accessibility compliance of the Blazor Toggle Switch Button component is shown in the following sample. Open the [sample](https://blazor.syncfusion.com/accessibility/switch) in a new window to evaluate the accessibility of the Blazor Toggle Switch Button component with accessibility tools.
Copy file name to clipboardExpand all lines: blazor/toggle-switch-button/getting-started-webapp.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ documentation: ug
9
9
10
10
# Getting Started with Blazor Toggle Switch Button in Blazor Web App
11
11
12
-
This section briefly explains about how to include [Blazor Toggle Switch Button](https://www.syncfusion.com/blazor-components/blazor-toggle-switch-button) component in your Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/) and Visual Studio Code.
12
+
This section explains how to include the [Blazor Toggle Switch Button](https://www.syncfusion.com/blazor-components/blazor-toggle-switch-button) component in a Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/) and Visual Studio Code.
13
13
14
14
{% tabcontents %}
15
15
@@ -21,17 +21,17 @@ This section briefly explains about how to include [Blazor Toggle Switch Button]
21
21
22
22
## Create a new Blazor Web App in Visual Studio
23
23
24
-
You can create a **Blazor Web App** using Visual Studio 2022 via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
24
+
Create a **Blazor Web App** using Visual Studio 2022 via [Microsoft templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
25
25
26
-
You need to configure the corresponding[Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs)while creating a Blazor Web Application.
26
+
Configure the appropriate[Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vs)when creating the Blazor Web App.
27
27
28
28
## Install Syncfusion<supstyle="font-size:70%">®</sup> Blazor Buttons and Themes NuGet in the App
29
29
30
-
To add **Blazor Toggle Switch Button** component in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install [Syncfusion.Blazor.Buttons](https://www.nuget.org/packages/Syncfusion.Blazor.Buttons) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
30
+
To add the **Blazor Toggle Switch Button** component, open the NuGet Package Manager in Visual Studio (Tools → NuGet Package Manager → Manage NuGet Packages for Solution), then search for and install [Syncfusion.Blazor.Buttons](https://www.nuget.org/packages/Syncfusion.Blazor.Buttons) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
31
31
32
-
If you utilize`WebAssembly or Auto` render modes in the Blazor Web App need to be install Syncfusion<supstyle="font-size:70%">®</sup> Blazor components NuGet packages within the client project.
32
+
If using the`WebAssembly` or `Auto` render modes in a Blazor Web App, install the Syncfusion<supstyle="font-size:70%">®</sup> Blazor NuGet packages in the client project.
33
33
34
-
Alternatively, you can utilize the following package manager command to achieve the same.
34
+
Alternatively, use the following Package Manager commands.
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available in[nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to[NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages)topic for available NuGet packages list with component details.
45
+
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available on[nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). See the[NuGet packages list](https://blazor.syncfusion.com/documentation/nuget-packages) for available packages and component details.
## Create a new Blazor Web App in Visual Studio Code
56
56
57
-
You can create a **Blazor Web App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
57
+
Create a **Blazor Web App** using Visual Studio Code via [Microsoft templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) or the [Syncfusion<supstyle="font-size:70%">®</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
58
58
59
-
You need to configure the corresponding[Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc)while creating a Blazor Web Application.
59
+
Configure the appropriate[Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc)when creating the Blazor Web App.
60
60
61
61
For example, in a Blazor Web App with the `Auto` interactive render mode, use the following commands.
62
62
@@ -70,15 +70,15 @@ cd BlazorWebApp.Client
70
70
{% endhighlight %}
71
71
{% endtabs %}
72
72
73
-
N> For more information on creating a **Blazor Web App** with various interactive modes and locations, refer to this [link](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=visual-studio-code#render-interactive-modes).
73
+
N> For more information on creating a **Blazor Web App** with various interactive modes and locations, refer to the [render interactive modes](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=visual-studio-code#render-interactive-modes) section.
74
74
75
75
## Install Syncfusion<supstyle="font-size:70%">®</sup> Blazor Buttons and Themes NuGet in the App
76
76
77
-
If you utilize `WebAssembly` or `Auto` render modes in the Blazor Web App need to be install Syncfusion<supstyle="font-size:70%">®</sup> Blazor components NuGet packages within the client project.
77
+
If using `WebAssembly` or `Auto` render modes in a Blazor Web App, install the Syncfusion<supstyle="font-size:70%">®</sup> Blazor components NuGet packages within the client project.
78
78
79
79
* Press <kbd>Ctrl</kbd>+<kbd>`</kbd> to open the integrated terminal in Visual Studio Code.
80
-
* Ensure you’re in the project root directory where your `.csproj` file is located.
81
-
* Run the following command to install a [Syncfusion.Blazor.Buttons](https://www.nuget.org/packages/Syncfusion.Blazor.Buttons) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package and ensure all dependencies are installed.
80
+
* Ensure the current directory contains the project `.csproj` file.
81
+
* Run the following commands to install [Syncfusion.Blazor.Buttons](https://www.nuget.org/packages/Syncfusion.Blazor.Buttons) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/), and restore dependencies.
82
82
83
83
{% tabs %}
84
84
@@ -92,7 +92,7 @@ dotnet restore
92
92
93
93
{% endtabs %}
94
94
95
-
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available in[nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to[NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages)topic for available NuGet packages list with component details.
95
+
N> Syncfusion<supstyle="font-size:70%">®</sup> Blazor components are available on[nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). See the[NuGet packages list](https://blazor.syncfusion.com/documentation/nuget-packages) for available packages and component details.
| WebAssembly or Auto | Open **~/_Imports.razor** file from the client project.|
106
-
| Server | Open **~/_import.razor** file, which is located in the `Components` folder.|
106
+
| Server | Open **~/_Imports.razor** file, which is located in the `Components` folder.|
107
107
108
-
Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Buttons`namespace.
108
+
Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Buttons`namespaces.
109
109
110
110
{% tabs %}
111
111
{% highlight C# tabtitle="~/_Imports.razor" %}
@@ -116,9 +116,9 @@ Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Buttons` namespace.
116
116
{% endhighlight %}
117
117
{% endtabs %}
118
118
119
-
Now, register the Syncfusion<supstyle="font-size:70%">®</sup> Blazor Service in the **~/Program.cs** file of your Blazor Web App.
119
+
Now, register the Syncfusion<supstyle="font-size:70%">®</sup> Blazor service in the **~/Program.cs** file of the Blazor Web App.
120
120
121
-
If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, you need to register the Syncfusion<supstyle="font-size:70%">®</sup> Blazor service in both **~/Program.cs** files of your Blazor Web App.
121
+
If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, register the Syncfusion<supstyle="font-size:70%">®</sup> Blazor service in both **~/Program.cs** files of the Blazor Web App.
If the **Interactive Render Mode** is set to `Server`, your project will contain a single **~/Program.cs** file. So, you should register the Syncfusion<supstyle="font-size:70%">®</sup> Blazor Service only in that **~/Program.cs** file.
155
+
If the **Interactive Render Mode** is set to `Server`, the project contains a single **~/Program.cs** file. In this case, register the Syncfusion<supstyle="font-size:70%">®</sup> Blazor service only in that **~/Program.cs** file.
@@ -189,7 +189,7 @@ The theme stylesheet and script can be accessed from NuGet through [Static Web A
189
189
</body>
190
190
```
191
191
192
-
N> Check out the [Blazor Themes](https://blazor.syncfusion.com/documentation/appearance/themes)topic to discover various methods ([Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets), [CDN](https://blazor.syncfusion.com/documentation/appearance/themes#cdn-reference), and [CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator)) for referencing themes in your Blazor application. Also, check out the [Adding Script Reference](https://blazor.syncfusion.com/documentation/common/adding-script-references) topic to learn different approaches for adding script references in your Blazor application.
192
+
N> See [Blazor Themes](https://blazor.syncfusion.com/documentation/appearance/themes)for theme reference options ([Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets), [CDN](https://blazor.syncfusion.com/documentation/appearance/themes#cdn-reference), and [CRG](https://blazor.syncfusion.com/documentation/common/custom-resource-generator)). Choose a theme that matches the application (for example, Bootstrap 5, Fluent, or Material). The script reference enables required JavaScript interop for Syncfusion components.
@@ -202,7 +202,7 @@ Add the Syncfusion<sup style="font-size:70%">®</sup> Blazor Toggle Switch Bu
202
202
|| Server |@rendermode InteractiveServer |
203
203
|| None | --- |
204
204
205
-
N> If an**Interactivity Location** is set to `Global` and the **Render Mode** is set to `Auto` or `WebAssembly` or `Server`, the render mode is configured in the `App.razor` file by default.
205
+
N> If the**Interactivity location** is set to `Global` and the **Render mode** is `Auto`, `WebAssembly`, or `Server`, the render mode is configured in the `App.razor` file by default.
206
206
207
207
{% tabs %}
208
208
{% highlight razor %}
@@ -227,13 +227,13 @@ N> If an **Interactivity Location** is set to `Global` and the **Render Mode** i
227
227
{% endhighlight %}
228
228
{% endtabs %}
229
229
230
-
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This will render the Syncfusion<supstyle="font-size:70%">®</sup> Blazor Toggle Switch Button component in your default web browser.
230
+
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This renders the Syncfusion<supstyle="font-size:70%">®</sup> Blazor Toggle Switch Button component in the default web browser.
On and Off text can be set using [OnLabel](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Buttons.SfSwitch-1.html#Syncfusion_Blazor_Buttons_SfSwitch_1_OnLabel) and [OffLabel](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Buttons.SfSwitch-1.html#Syncfusion_Blazor_Buttons_SfSwitch_1_OffLabel) properties of Toggle Switch Button component. In the following example, `onLabel` is set as `ON` and `offLabel` is set as `OFF`.
236
+
On and Off text can be set using the [OnLabel](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Buttons.SfSwitch-1.html#Syncfusion_Blazor_Buttons_SfSwitch_1_OnLabel) and [OffLabel](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Buttons.SfSwitch-1.html#Syncfusion_Blazor_Buttons_SfSwitch_1_OffLabel) properties of the Toggle Switch Button component. In the following example, `onLabel` is set as `ON` and `offLabel` is set as `OFF`.
237
237
238
238
{% tabs %}
239
239
{% highlight razor %}
@@ -247,7 +247,7 @@ On and Off text can be set using [OnLabel](https://help.syncfusion.com/cr/blazor
247
247
{% endhighlight %}
248
248
{% endtabs %}
249
249
250
-
N> Switch does not have text support for material themes, and does not support long custom text.
250
+
N> The switch does not have text support in Material themes and does not support long custom text.
0 commit comments