Skip to content

Commit c5ca15d

Browse files
Merge pull request #6870 from syncfusion-content/984382-tab2
Updated the UG document for the Tab Component
2 parents 3cfe541 + 203f988 commit c5ca15d

File tree

10 files changed

+101
-85
lines changed

10 files changed

+101
-85
lines changed

blazor/tabs/accessibility.md

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

1010
# Accessibility in Blazor Tabs Component
1111

12-
The [Blazor Tabs](https://www.syncfusion.com/blazor-components/blazor-tabs) 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 Tabs](https://www.syncfusion.com/blazor-components/blazor-tabs) 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 commonly used [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) for evaluating accessibility.
1313

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

@@ -37,7 +37,7 @@ The accessibility compliance for the Blazor Tabs 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

4242
[Blazor Tabs](https://www.syncfusion.com/blazor-components/blazor-tabs) component is designed by considering [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/practices/) standard. Tab is supported with ARIA Accessibility which is accessible by on-screen readers, and other assistive technology devices.
4343

@@ -55,9 +55,9 @@ The following list of attributes are added in the Tab.
5555
| aria-haspopup | Attribute is set to the Popup element to indicates the popup mode in the Tab. The default value of this attribute is false. If popup mode is enabled, the attribute value is set to true. |
5656
| aria-disabled | Attribute set to the Tab items to It indicates the disabled state of the Tab. |
5757

58-
## Keyboard interaction
58+
## Keyboard Interaction
5959

60-
By default, keyboard navigation is enabled. This component implements keyboard navigation support by following the [WAI-ARIA](https://www.w3.org/TR/wai-aria-practices/#Tabpanel) practices. Once focused on the active Tab element, you can use the following key combination for interacting with the Tab.
60+
By default, keyboard navigation is enabled. This component implements keyboard navigation support by following the [WAI-ARIA](https://www.w3.org/TR/wai-aria-practices/#Tabpanel) practices. Once focus is on the active Tab element, the following key combinations can be used for interaction:
6161

6262
| Windows | Mac | Actions |
6363
|--- |--- | --- |
@@ -71,12 +71,12 @@ By default, keyboard navigation is enabled. This component implements keyboard n
7171
| <kbd>Shift + F10 </kbd> | <kbd>⇧</kbd> + <kbd>F10</kbd> | If popup mode is enabled, it opens the popup when the Tab is focused. |
7272
| <kbd>Delete</kbd> | <kbd>Delete</kbd> | Deletes the Tab, if close button is enabled in Tab header. |
7373

74-
## Ensuring accessibility
74+
## Ensuring Accessibility
7575

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

7878
The accessibility compliance of the Tabs component is shown in the following sample. Open the [sample](https://blazor.syncfusion.com/accessibility/tab) in a new window to evaluate the accessibility of the Tabs component with accessibility tools.
7979

80-
## See also
80+
## See Also
8181

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

blazor/tabs/animations.md

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

1212
The [Blazor Tabs](https://www.syncfusion.com/blazor-components/blazor-tabs) component supports custom animations for both previous and next actions from the provided animation option of `Animation` library. The animation property also allows to set `Easing`, `Duration` and various other effects.
1313

14-
Default animation is given as `SlideLeftIn` for previous tab animation and `SlideRightIn` for next tab animation. Disable the animation by setting the animation `Effect` as `None`. Also, use the following CSS to disable indicator animation for animation `Effect` as `None`.
14+
By default, `SlideLeftIn` is used for the previous tab animation, and `SlideRightIn` is used for the next tab animation. Disable animation by setting the animation `Effect` to `AnimationEffect.None`.
15+
16+
To disable the indicator animation when the `Effect` is `None`, use the following CSS:
1517

1618
```CSS
1719

@@ -125,4 +127,6 @@ The sample demonstrates some types of animation that suits our Tabs. Check all t
125127
}
126128
```
127129

130+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VXVyWjCNCngbWXGc?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
131+
128132
![Blazor Tabs with Animation](./images/blazor-tabs-animation.gif)

blazor/tabs/content-render-modes.md

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

1010
# Content Render Modes in Blazor Tabs Component
1111

12-
In [Blazor Tabs](https://www.syncfusion.com/blazor-components/blazor-tabs), the content of the Tabs can be rendered based on the scenario. The content rendering of tabs can be done by the following three different ways.
12+
In the [Blazor Tabs](https://www.syncfusion.com/blazor-components/blazor-tabs) component, content can be rendered according to specific scenarios using three different modes:
1313

1414
* [Dynamic rendering](#dynamic-rendering)
1515
* [On Demand rendering or lazy loading](#on-demand-rendering-or-lazy-loading)
1616
* [On initial rendering](#on-initial-rendering)
1717

18-
## Dynamic rendering
18+
## Dynamic Rendering
1919

2020
This mode is the default one in which the content of the selected tab alone will be loaded and available in DOM initially and it will be replaced with corresponding content if you select the tab dynamically. Since in this mode, the browser maintains the DOM with current active tab content alone, page loading performance is increased with rendering DOM. But the Tabs doesn't maintain its current state since every time tab loaded with fresh content.
2121

22-
In the following code example, there are two tabs. The first tab have a login page and second tab have Grid component. The second tab Grid component will be rendered in the DOM only when the login is completed. The second tab will be replaced the first tab in the DOM.
22+
In the following code example, there are two tabs. The second tab's Grid component is rendered in the DOM only after a successful login in the first tab. The second tab will be replaced the first tab in the DOM.
2323

2424
```cshtml
2525
@using Syncfusion.Blazor.Buttons
@@ -127,11 +127,11 @@ In the following code example, there are two tabs. The first tab have a login pa
127127
}
128128
```
129129

130-
N> In this mode, if you want to maintain the state, you have to handle it in application end.
130+
N> To maintain the state in this mode, manage it within the application logic.
131131

132-
## On Demand rendering or lazy loading
132+
## On Demand Rendering or Lazy Loading
133133

134-
You can set this mode to our Tabs by setting `ContentLoad.Demand` to the property `LoadOn`. In this mode, the content of the selected tab alone will be loaded initially. The content of the selected tab will be rendered on selection. The content of the tabs which were loaded once will be maintained in the DOM. In this mode, since the selected tab content alone rendered on initial load and maintained the other tabs on selection in the DOM, state of the tabs like scroller position, form values etc.., will be maintained.
134+
Enable this mode by setting the `LoadOn` property to `ContentLoad.Demand`. In this mode, only the content of the initially selected tab is loaded into the DOM. Content for other tabs is rendered only when they are selected for the first time. Once loaded, the content of these tabs is maintained in the DOM. This approach ensures state preservation for components within tabs (e.g., scroll position, form values) while optimizing initial load times.
135135

136136
In the following code example, Calendar and Scheduler have been rendered in first and second tab respectively. Initially, Scheduler is not available once the second tab is selected, scheduler will be rendered. Both the calendar and scheduler will be maintained in DOM, changing the date either in calendar or scheduler will change the date in other.
137137

@@ -173,9 +173,9 @@ In the following code example, Calendar and Scheduler have been rendered in firs
173173
}
174174
```
175175

176-
## On initial rendering
176+
## On Initial Rendering
177177

178-
This mode can be set to the Tabs by setting `ContentLoad.Init` to the property `LoadOn`. In this mode, the content of all the tabs will be rendered on initial load and maintained in the DOM. You can use this mode, when you have less number of tabs and you need to maintain the state of tabs. In this mode, you can access the reference of components rendered in other tabs.
178+
Enable this mode by setting the `LoadOn` property to `ContentLoad.Init`. In this mode, the content of all tabs is rendered and loaded into the DOM initially. This mode is suitable for a smaller number of tabs, where maintaining the state of all tabs is a priority and you need to access components rendered in other tabs directly (e.g., via component references).
179179

180180
In the following example, all the three tabs are rendered in initial load itself and the data entered in the first tab will be maintained even when second or third tab is in active state.
181181

blazor/tabs/drag-and-drop.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@ documentation: ug
1111

1212
The [Blazor Tab](https://www.syncfusion.com/blazor-components/blazor-tabs) component allows to drag and drop any item by setting `AllowDragAndDrop` &nbsp;to **true**. Items can be reordered to any place by dragging and dropping them onto the desired location.
1313

14-
* If you need to prevent dragging action for a particular item, the `OnDragStart` event can be used which will trigger when the item drag is started. If you need to prevent dropping action for a particular item, the `Dragged` event can be used which will trigger when the drag action is stopped.
15-
16-
* The `DragArea` defines the area in which the draggable element movement will be occurring. Outside that area will be restricted for the draggable element movement.
17-
18-
* The `OnDragStart` event will be triggered before dragging the item from Tab.
19-
20-
* The `Dragged` event will be triggered when the Tab item is dropped on the target element successfully.
14+
* **Preventing Dragging:** To prevent dragging for a particular item, the [`OnDragStart`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.TabEvents.html#Syncfusion_Blazor_Navigations_TabEvents_OnDragStart) event can be used. This event triggers when an item's drag action begins, allowing for conditional cancellation.
15+
* **Preventing Dropping:** To prevent dropping for a particular item, the [`OnDrop`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.TabEvents.html#Syncfusion_Blazor_Navigations_TabEvents_OnDrop) event (or `Dragged` event for post-drop logic) can be used. The `Dragged` event triggers when the drag action is stopped (i.e., the item is dropped).
16+
* **Defining Drag Area:** The [`DragArea`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Navigations.SfTab.html#Syncfusion_Blazor_Navigations_SfTab_DragArea) property defines the boundary within which a draggable element can be moved. Movement outside this area is restricted.
17+
* **Event Triggering:**
18+
* The `OnDragStart` event triggers before dragging an item from the Tab.
19+
* The `Dragged` event triggers when the Tab item is dropped successfully onto a target element.
2120

2221
In the following sample, the `AllowDragAndDrop` property is enabled.
2322

24-
N> External drag and drop is not possible in blazor Tabs.
23+
N> External drag and drop (dragging items from outside the Tabs component into it, or vice-versa) is not directly supported by the Blazor Tabs component's `AllowDragAndDrop` feature.
2524

2625
```cshtml
2726
@using Syncfusion.Blazor.Navigations
@@ -61,4 +60,6 @@ N> External drag and drop is not possible in blazor Tabs.
6160
6261
```
6362

63+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rDVeMNiNCxoJPste?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
64+
6465
![Drag and Drop Items in Blazor Tabs](./images/blazor-tabs-drag-drop-items.gif)

0 commit comments

Comments
 (0)