Skip to content

Commit c511029

Browse files
Merge pull request #6843 from syncfusion-content/984382-sidebar
Updated the UG document for the Sidebar Component
2 parents 615670e + 3cc6a5b commit c511029

12 files changed

+66
-64
lines changed

blazor/sidebar/accessibility.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99

1010
# Accessibility in Blazor Sidebar Component
1111

12-
The [Blazor Sidebar](https://www.syncfusion.com/blazor-components/blazor-sidebar) 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 Sidebar](https://www.syncfusion.com/blazor-components/blazor-sidebar) component adheres to 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.
1313

1414
The accessibility compliance for the Blazor Sidebar component is outlined below.
1515

@@ -37,24 +37,24 @@ The accessibility compliance for the Blazor Sidebar component is outlined below.
3737

3838
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/no.png" alt="No"> - The component does not meet the requirement.</div>
3939

40-
## WAI-ARIA attributes
40+
## WAI-ARIA Attributes
4141

42-
The Blazor Sidebar component followed the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/) patterns to meet accessibility standards. By default, the Sidebar utilizes the [complementary](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/complementary_role) role, with the option to modify the ARIA role based on provided attributes to the root element, depending on the specific use case.
42+
The Blazor Sidebar component adheres to [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/) patterns to meet accessibility standards. By default, the Sidebar utilizes the [complementary](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/complementary_role) role, with the option to modify the ARIA role based on provided attributes to the root element, depending on the specific use case.
4343

4444
If there are multiple complementary landmark roles or aside elements in a document, it is important to provide a label for each landmark using the `aria-label` attribute. Alternatively, if the aside has a descriptive title, it can be referenced using the `aria-labelledby` attribute. This label will help assistive technology users quickly understand the purpose of each landmark.
4545

4646
For optimal accessibility, it is recommended to incorporate a trigger component that is navigable via a keyboard, such as a button. If this is not feasible, inclusion of the `tabIndex` attribute becomes necessary. Furthermore, explicit handling of the `aria-expanded` attribute is required for the trigger element.
4747

48-
## Keyboard interaction
48+
## Keyboard Interaction
4949

50-
The Blazor Sidebar component does not have any inbuilt keyboard interaction support. However, you can utilize the keyboard interactions of focusable elements within the Sidebar component.
50+
The Blazor Sidebar component does not have any built-in keyboard interaction support. However, keyboard interactions of focusable elements within the Sidebar component can be utilized.
5151

52-
## Ensuring accessibility
52+
## Ensuring Accessibility
5353

5454
The Blazor Sidebar component's accessibility levels are ensured through an [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) software tool during automated testing.
5555

5656
The accessibility compliance of the Sidebar component is shown in the following sample. Open the [sample](https://blazor.syncfusion.com/accessibility/sidebar) in a new window to evaluate the accessibility of the Sidebar component with accessibility tools.
5757

58-
## See also
58+
## See Also
5959

6060
* [Accessibility in Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components](https://blazor.syncfusion.com/documentation/common/accessibility)

blazor/sidebar/auto-close.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ documentation: ug
1111

1212
# Responsive Sidebar in Blazor Sidebar Component
1313

14-
[Blazor Sidebar](https://www.syncfusion.com/blazor-components/blazor-sidebar) often behaves differently on a mobile versus a desktop display. It has an effective feature that offers to set it in opened or closed state corresponding to the specified resolution. This is achieved through [`MediaQuery`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfSidebar.html#Syncfusion_Blazor_Navigations_SfSidebar_MediaQuery) property that allows to set the Sidebar in an expanded state or collapsed state only in user-defined resolution.
14+
The [Blazor Sidebar](https://www.syncfusion.com/blazor-components/blazor-sidebar) often exhibits different behavior on mobile and desktop displays. An effective feature allows setting its opened or closed state corresponding to a specified resolution. This is achieved through the [`MediaQuery`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfSidebar.html#Syncfusion_Blazor_Navigations_SfSidebar_MediaQuery) property, which allows the Sidebar to be set to an expanded or collapsed state based on a user-defined resolution.
1515

1616
In the following sample, **mediaQuery** has been used for specific resolution to close and open sidebar.
1717

@@ -46,4 +46,5 @@ In the following sample, **mediaQuery** has been used for specific resolution to
4646
4747
```
4848

49+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VthoCNtFTZkcfsLg?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
4950
![Displaying Auto close in Blazor Sidebar](./images/blazor-sidebar-auto-close.gif)

blazor/sidebar/custom-context.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99

1010
<!-- markdownlint-disable MD009 -->
1111

12-
# Sidebar for specific content in Blazor Sidebar Component
12+
# Sidebar for Specific Content in Blazor Sidebar Component
1313

1414
By default, [Blazor Sidebar](https://www.syncfusion.com/blazor-components/blazor-sidebar) initializes context to the body element. Using the [`Target`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfSidebar.html#Syncfusion_Blazor_Navigations_SfSidebar_Target) property, set context element to initialize Sidebar inside any HTML element apart from the body element.
1515

@@ -125,4 +125,5 @@ In the following sample, click the toggle button to expand or collapse the Sideb
125125
126126
```
127127

128+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hZhyiZZPJWXQVUGU?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
128129
![Blazor Sidebar with Custom Context](./images/blazor-sidebar-custom-context.png)

blazor/sidebar/docking-sidebar.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ documentation: ug
1111

1212
# Dock in Blazor Sidebar Component
1313

14-
Dock state of the [Blazor Sidebar](https://www.syncfusion.com/blazor-components/blazor-sidebar) reserves some space on the page that always remains in a visible state when the Sidebar is collapsed. It is used to show the short term of a content like icons alone instead of lengthy text.
14+
The dock state of the [Blazor Sidebar](https://www.syncfusion.com/blazor-components/blazor-sidebar) reserves space on the page, remaining visible even when the Sidebar is collapsed. It is used to display a concise version of content, such as icons, instead of lengthy text.
1515

1616
In the following sample, the list item has icon with text representation. On dock state only the icon listed out to interact. It can be achieved by using [`EnableDock`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfSidebar.html#Syncfusion_Blazor_Navigations_SfSidebar_EnableDock) property
1717

@@ -170,5 +170,5 @@ In the following sample, the list item has icon with text representation. On doc
170170
171171
```
172172

173-
173+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rZroCDtlpsCxDdVf?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
174174
![Docking in Blazor Sidebar](./images/blazor-sidebar-dock.gif)

blazor/sidebar/getting-started-webapp.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99

1010
# Getting Started with Blazor Sidebar in Blazor Web App
1111

12-
This section briefly explains about how to include [Blazor Sidebar](https://www.syncfusion.com/blazor-components/blazor-sidebar) component in your Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/) and Visual Studio Code.
12+
This section explains how to integrate the Syncfusion [Blazor Sidebar](https://www.syncfusion.com/blazor-components/blazor-sidebar) component into a Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/) and Visual Studio Code.
1313

1414
{% tabcontents %}
1515

@@ -19,19 +19,19 @@ This section briefly explains about how to include [Blazor Sidebar](https://www.
1919

2020
* [System requirements for Blazor components](https://blazor.syncfusion.com/documentation/system-requirements)
2121

22-
## Create a new Blazor Web App in Visual Studio
22+
## Create a New Blazor Web App in Visual Studio
2323

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<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
24+
A **Blazor Web App** can be created 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<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
2525

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 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.
2727

2828
## Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Navigations and Themes NuGet in the App
2929

3030
To add **Blazor Sidebar** 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.Navigations](https://www.nuget.org/packages/Syncfusion.Blazor.Navigations/) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
3131

32-
If you utilize `WebAssembly or Auto` render modes in the Blazor Web App need to be install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components NuGet packages within the client project.
32+
If `WebAssembly` or `Auto` render modes are utilized in the Blazor Web App, Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor component NuGet packages must be installed within the client project.
3333

34-
Alternatively, you can utilize the following package manager command to achieve the same.
34+
Alternatively, the Package Manager Console can be used to install the required NuGet package
3535

3636
{% tabs %}
3737
{% highlight C# tabtitle="Package Manager" %}
@@ -52,11 +52,11 @@ N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are availa
5252

5353
* [System requirements for Blazor components](https://blazor.syncfusion.com/documentation/system-requirements)
5454

55-
## Create a new Blazor Web App in Visual Studio Code
55+
## Create a New Blazor Web App in Visual Studio Code
5656

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<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
57+
A **Blazor Web App** can be created 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<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
5858

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 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.
6060

6161
For example, in a Blazor Web App with the `Auto` interactive render mode, use the following commands.
6262

@@ -74,10 +74,10 @@ N> For more information on creating a **Blazor Web App** with various interactiv
7474

7575
## Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Navigations and Themes NuGet in the App
7676

77-
If you utilize `WebAssembly` or `Auto` render modes in the Blazor Web App need to be install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components NuGet packages within the client project.
77+
If `WebAssembly` or `Auto` render modes are utilized in the Blazor Web App, install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor component NuGet packages within the client project.
7878

7979
* 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.
80+
* Ensure the current directory is the project root containing the `.csproj` file.
8181
* Run the following command to install a [Syncfusion.Blazor.Navigations](https://www.nuget.org/packages/Syncfusion.Blazor.Navigations) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/) NuGet package and ensure all dependencies are installed.
8282

8383
{% tabs %}
@@ -116,9 +116,9 @@ Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Navigations` namespace.
116116
{% endhighlight %}
117117
{% endtabs %}
118118

119-
Now, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service in the **~/Program.cs** file of your Blazor Web App.
119+
Now, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service in the **~/Program.cs** file of the Blazor Web App.
120120

121-
If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, you need to register the Syncfusion<sup style="font-size:70%">&reg;</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<sup style="font-size:70%">&reg;</sup> Blazor service in both **~/Program.cs** files of the Blazor Web App.
122122

123123
{% tabs %}
124124
{% highlight c# tabtitle="Server(~/_Program.cs)" hl_lines="3 11" %}
@@ -152,7 +152,7 @@ await builder.Build().RunAsync();
152152
{% endhighlight %}
153153
{% endtabs %}
154154

155-
If the **Interactive Render Mode** is set to `Server`, your project will contain a single **~/Program.cs** file. So, you should register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service only in that **~/Program.cs** file.
155+
If the **Interactive Render Mode** is set to `Server`, the project will contain a single **~/Program.cs** file. In this case, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service only in that **~/Program.cs** file.
156156

157157
{% tabs %}
158158
{% highlight c# tabtitle="~/_Program.cs" hl_lines="2 9" %}
@@ -173,7 +173,7 @@ var app = builder.Build();
173173
{% endhighlight %}
174174
{% endtabs %}
175175

176-
## Add stylesheet and script resources
176+
## Add Stylesheet and Script Resources
177177

178178
The theme stylesheet and script can be accessed from NuGet through [Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets). Include the stylesheet reference in the `<head>` section and the script reference at the end of the `<body>` in the **~/Components/App.razor** file as shown below:
179179

@@ -251,10 +251,9 @@ N> If an **Interactivity Location** is set to `Global` and the **Render Mode** i
251251

252252
N> [View Sample in GitHub](https://github.com/SyncfusionExamples/Blazor-Getting-Started-Examples/tree/main/Sidebar/BlazorWebApp).
253253

254-
## Enable backdrop
254+
## Enable Backdrop
255255

256-
Enabling the [ShowBackdrop](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfSidebar.html#Syncfusion_Blazor_Navigations_SfSidebar_ShowBackdrop) in the Sidebar component will prevent the main content from user interactions.
257-
Here, the DOM elements will not get changed. It only closes the main content by covering with a black backdrop overlay and focuses the Sidebar in the screen.
256+
Enabling the [ShowBackdrop](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfSidebar.html#Syncfusion_Blazor_Navigations_SfSidebar_ShowBackdrop) property in the Sidebar component prevents user interactions with the main content. The DOM elements remain unchanged. The main content is merely visually obscured by a black backdrop overlay, focusing attention on the Sidebar.
258257

259258
{% tabs %}
260259
{% highlight razor %}
@@ -303,7 +302,7 @@ Here, the DOM elements will not get changed. It only closes the main content by
303302
{% endhighlight %}
304303
{% endtabs %}
305304

306-
N> Class can be added to the Sidebar element using `HtmlAttributes` property. In that class, you have to add new styles or override existing styles of Sidebar element.
305+
N> Classes can be added to the Sidebar element using the `HtmlAttributes` property. Within that class, new styles can be added or existing Sidebar styles can be overridden.
307306

308307
{% previewsample "https://blazorplayground.syncfusion.com/embed/BjhTjsAXUHEgsGGw?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" backgroundimage "[Enabling Backdrop in Blazor Sidebar](./images/blazor-sidebar-enable-backdrop.png)" %}
309308

0 commit comments

Comments
 (0)