Skip to content

Commit bd97f32

Browse files
983104: Updated the UG Documentation for listbox
1 parent a2a4152 commit bd97f32

18 files changed

+161
-162
lines changed

blazor/listbox/accessibility.md

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

1010
# Accessibility in Blazor ListBox Component
1111

12-
The Blazor ListBox 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 ListBox component followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), and [WCAG 2.2](https://www.w3.org/TR/WCAG22/). It also implements appropriate [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) to support assistive technologies.
1313

14-
The accessibility compliance for the Blazor ListBox component is outlined below.
14+
The following table summarizes the accessibility compliance of the Blazor ListBox component.
1515

1616
| Accessibility Criteria | Compatibility |
1717
| -- | -- |
18-
| [WCAG 2.2 Support](../common/accessibility#accessibility-standards) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
19-
| [Section 508 Support](../common/accessibility#accessibility-standards) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
20-
| [Screen Reader Support](../common/accessibility#screen-reader-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
21-
| [Right-To-Left Support](../common/accessibility#right-to-left-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
22-
| [Color Contrast](../common/accessibility#color-contrast) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
23-
| [Mobile Device Support](../common/accessibility#mobile-device-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
24-
| [Keyboard Navigation Support](../common/accessibility#keyboard-navigation-support) |<img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
25-
| [Axe-core Accessibility Validation](../common/accessibility#ensuring-accessibility) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
18+
| [WCAG 2.2 Support](../common/accessibility#accessibility-standards) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Meets requirement"> |
19+
| [Section 508 Support](../common/accessibility#accessibility-standards) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Meets requirement"> |
20+
| [Screen Reader Support](../common/accessibility#screen-reader-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Meets requirement"> |
21+
| [Right-to-left support](../common/accessibility#right-to-left-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Meets requirement"> |
22+
| [Color Contrast](../common/accessibility#color-contrast) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Meets requirement"> |
23+
| [Mobile Device Support](../common/accessibility#mobile-device-support) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Meets requirement"> |
24+
| [Keyboard Navigation Support](../common/accessibility#keyboard-navigation-support) |<img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Meets requirement"> |
25+
| [Axe-core Accessibility Validation](../common/accessibility#ensuring-accessibility) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Meets requirement"> |
2626

2727
<style>
2828
.post .post-content img {
@@ -31,44 +31,43 @@ The accessibility compliance for the Blazor ListBox component is outlined below.
3131
}
3232
</style>
3333

34-
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> - All features of the component meet the requirement.</div>
34+
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Meets requirement"> - All features of the component meet the requirement.</div>
3535

36-
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/intermediate.png" alt="Intermediate"> - Some features of the component do not meet the requirement.</div>
36+
<div><img src="https://cdn.syncfusion.com/content/images/landing-page/intermediate.png" alt="Partially meets requirement"> - Some features of the component do not meet the requirement.</div>
3737

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

4040
## WAI-ARIA attributes
4141

42-
The Blazor ListBox component followed the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/) patterns to meet the accessibility. The following ARIA attributes are used in the Blazor ListBox component:
42+
The Blazor ListBox component follows the [WAI-ARIA listbox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/) to meet accessibility requirements. The following ARIA attributes are used in the Blazor ListBox component:
4343

4444
| Attributes | Purpose |
4545
| --- | --- |
46-
| `role` | Indicates the ListBox component wrapper element as `listbox`, the `UL` element as `presentation`, and its list item as `option`. |
46+
| `role` | Indicates the ListBox component wrapper element as `listbox`, the `ul` element as `presentation`, and each list item as `option`. |
4747
| `aria-label` | Provides an accessible name for the ListBox component. |
48-
| `aria-multiselectable` | Applied to the element with the ListBox role, tells assistive technologies that the list supports multiple selection. The default value is true. |
49-
| `aria-selected` | Applied to elements with role option that are visually styled as selected to inform assistive technologies that the options are selected. |
48+
| `aria-multiselectable` | Applied to the element with the `listbox` role to indicate that multiple selection is supported. This is applied when multiple selection is enabled (default behavior). |
49+
| `aria-selected` | Applied to elements with the `option` role that are visually styled as selected to inform assistive technologies that the options are selected. |
5050

5151
## Keyboard interaction
5252

53-
The Blazor ListBox component followed the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/#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 ListBox component.
54-
53+
The Blazor ListBox component follows the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/#keyboardinteraction) guidelines, supporting users of assistive technologies and those who rely on keyboard navigation. The following keyboard shortcuts are supported by the Blazor ListBox component.
5554
| Windows | Mac| Actions |
5655
| --- | --- | --- |
5756
| <kbd>↑</kbd> | <kbd>↑</kbd> | Moves focus to the previous option. |
5857
| <kbd>↓</kbd> | <kbd>↓</kbd> | Moves focus to the next option. |
59-
| <kbd>Home</kbd> | <kbd>Home</kbd> | Moves focus to first option. |
60-
| <kbd>End</kbd> | <kbd>End</kbd> | Moves focus to last option. |
61-
| <kbd>Space</kbd> | <kbd>Space</kbd> | Changes the selection state of the focused option. |
58+
| <kbd>Home</kbd> | <kbd>Home</kbd> | Moves focus to the first option. |
59+
| <kbd>End</kbd> | <kbd>End</kbd> | Moves focus to the last option. |
60+
| <kbd>Space</kbd> | <kbd>Space</kbd> | Toggles the selection state of the focused option. |
6261
| <kbd>Ctrl + A</kbd> | <kbd>⌘</kbd> + <kbd>A</kbd> | Selects all options in the list. |
6362
| <kbd>Ctrl + Shift + Home</kbd> | <kbd>⌘</kbd> + <kbd>⇧</kbd> + <kbd>Home</kbd> | Selects the focused option and all options up to the first option. |
6463
| <kbd>Ctrl + Shift + End</kbd> | <kbd>⌘</kbd> + <kbd>⇧</kbd> + <kbd>End</kbd> | Selects the focused option and all options down to the last option. |
65-
| <kbd>Ctrl</kbd> + <kbd>↑</kbd> or <kbd>↓</kbd> | <kbd>⌘</kbd> + <kbd>↑</kbd> or <kbd>↓</kbd> | Press Ctrl key with up / down arrow or mouse to select multiple items. |
64+
| <kbd>Ctrl</kbd> + <kbd>↑</kbd> or <kbd>↓</kbd> | <kbd>⌘</kbd> + <kbd>↑</kbd> or <kbd>↓</kbd> | Moves focus without changing the current selection. Use Ctrl/Cmd with mouse click to toggle individual items. |
6665

6766
## Ensuring accessibility
6867

69-
The Blazor ListBox component's accessibility levels are ensured through an [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) with playwright tests.
68+
The Blazor ListBox component's accessibility levels are validated using [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) with Playwright tests.
7069

71-
The accessibility compliance of the Blazor ListBox component is shown in the following sample. Open the [sample](https://blazor.syncfusion.com/accessibility/listbox) in a new window to evaluate the accessibility of the Blazor ListBox component with accessibility tools.
70+
The accessibility compliance of the Blazor ListBox component is demonstrated in the following sample. Open the [sample](https://blazor.syncfusion.com/accessibility/listbox) in a new window to evaluate the component with accessibility tools.
7271

7372
{% previewsample "https://ej2.syncfusion.com/accessibility/list-box.html" %}
7473

blazor/listbox/data-binding.md

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

1010
# Data Binding in Blazor ListBox Component
1111

12-
The ListBox loads the data from local data sources using the [DataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.SfListBox-2.html) property.
12+
The ListBox loads data from local or remote sources using the [DataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.SfListBox-2.html) property.
1313

1414
| Fields | Type | Description |
1515
|------|------|-------------|
16-
| [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_Text) | `string` | Specifies the display text of each list item. |
17-
| [Value](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_Value) | `string` | Specifies the hidden data value mapped to each list item that should contain a unique value. |
18-
| [GroupBy](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_GroupBy) | `string` | Specifies the category under which the list item has to be grouped. |
19-
| [IconCss](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_IconCss) | `string` | Specifies the iconCss class that needs to be mapped. |
20-
| [HtmlAttributes](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_HtmlAttributes) | `string` | Allows additional attributes to configure the elements in various ways to meet the criteria. |
16+
| [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_Text) | `string` | Specifies the display text of each list item. |
17+
| [Value](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_Value) | `string` | Specifies the hidden data value mapped to each list item and should be unique. |
18+
| [GroupBy](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_GroupBy) | `string` | Specifies the category under which each list item is grouped. |
19+
| [IconCss](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_IconCss) | `string` | Specifies the CSS class for an icon to display with the item. |
20+
| [HtmlAttributes](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.FieldSettingsModel.html#Syncfusion_Blazor_DropDowns_FieldSettingsModel_HtmlAttributes) | `object` | Specifies additional HTML attributes to configure item elements. |
2121

22-
N> When binding complex data to the ListBox, fields should be mapped correctly. Otherwise, the selected item remains undefined.
22+
N> When binding complex data to the ListBox, map fields correctly. If the mapping is incorrect, selection and value binding may not work as expected.
2323

2424
## Local Data
2525

26-
Local data can be represented by the following ways.
26+
Local data can be provided in the following ways.
2727

2828
### Array of string
2929

30-
The ListBox has support to load array of primitive data such as strings or numbers. Here, both value and text field acts as same.
30+
The ListBox supports arrays of primitive values such as strings or numbers. In this case, both the Text and Value fields resolve to the same value.
3131

3232
```cshtml
3333
@using Syncfusion.Blazor.DropDowns
@@ -43,7 +43,7 @@ public string[] Games = new string[] { "Badminton", "Cricket", "Football", "Golf
4343

4444
The ListBox can generate its list items through an array of object data. For this, the appropriate columns should be mapped to the [Fields](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.SfListBox-2.html) property.
4545

46-
In the following example, `id` and `sports` column from complex data have been mapped to the `Value` field and `Text` field, respectively.
46+
In the following example, the `Text` property is mapped to the Text field and the `Id` property is mapped to the Value field.
4747

4848
```cshtml
4949
@using Syncfusion.Blazor.DropDowns
@@ -75,9 +75,9 @@ In the following example, `id` and `sports` column from complex data have been m
7575

7676
### Array of complex object
7777

78-
The ListBox can generate its list items through an array of complex data. For this, the appropriate columns should be mapped to the [Fields](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.SfListBox-2.html) property.
78+
The ListBox can generate items from an array of complex objects. Map nested properties to the [Fields](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DropDowns.SfListBox-2.html) property as needed.
7979

80-
In the following example, `sports.Name` column from complex data have been mapped to the `Text` field.
80+
In the following example, the `Sports.Name` property from the complex data is mapped to the Text field.
8181

8282
```cshtml
8383
@using Syncfusion.Blazor.DropDowns
@@ -109,14 +109,13 @@ In the following example, `sports.Name` column from complex data have been mappe
109109
}
110110
```
111111

112-
![Binding Complex Items with Blazor ListBox](images/blazor-listbox-bind-complex-items.png)
112+
![Blazor ListBox bound to complex objects with nested field mapping](images/blazor-listbox-bind-complex-items.png)
113113

114114
## Remote Data
115115

116-
The ListBox supports retrieval of data from remote data services with the help of [DataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html).
117-
118-
The following sample displays the employee names from `Employee` table.
116+
The ListBox supports retrieving data from remote services using the [DataManager](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.SfDataManager.html).
119117

118+
The following example displays customer IDs from the `Orders` table.
120119
```csharp
121120

122121
@using Syncfusion.Blazor.DropDowns
@@ -147,4 +146,4 @@ The following sample displays the employee names from `Employee` table.
147146

148147
```
149148

150-
![Blazor ListBox with Data Binding](images/blazor-listbox-with-data-binding.png)
149+
![Blazor ListBox bound to remote data using DataManager](images/blazor-listbox-with-data-binding.png)

0 commit comments

Comments
 (0)