Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions blazor/maps/accessibility.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
layout: post
title: Accessibility in Blazor Maps Component | Syncfusion
description: Checkout and learn here all about accessibility in Syncfusion Blazor Maps component and much more details.
description: Check out and learn here all about accessibility in the Syncfusion Blazor Maps component and much more details.
platform: Blazor
control: Maps
documentation: ug
---

# Accessibility in Blazor Maps Component

The [Blazor Maps](https://www.syncfusion.com/blazor-components/blazor-map) component follows commonly used accessibility guidelines and standards, such as [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).
The [Blazor Maps](https://www.syncfusion.com/blazor-components/blazor-map) component adheres to widely adopted 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/), and [WAI-ARIA roles](https://www.w3.org/TR/wai-aria/#roles).

The accessibility compliance for the Blazor Maps component is outlined below.
The accessibility compliance for the Blazor Maps component is summarized below.

| Accessibility Criteria | Compatibility |
| -- | -- |
Expand All @@ -21,7 +21,7 @@ The accessibility compliance for the Blazor Maps component is outlined below.
| [Right-To-Left Support](../common/accessibility) | Not Applicable |
| [Color Contrast](../common/accessibility) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
| [Mobile Device Support](../common/accessibility) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
| [Keyboard Navigation Support](../common/accessibility) |<img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
| [Keyboard Navigation Support](../common/accessibility) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |
| [Axe-core Accessibility Validation](../common/accessibility) | <img src="https://cdn.syncfusion.com/content/images/landing-page/yes.png" alt="Yes"> |

<style>
Expand All @@ -39,50 +39,50 @@ The accessibility compliance for the Blazor Maps component is outlined below.

## WAI-ARIA attributes

To meet accessibility standards, the Blazor Maps component follows to the [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/) patterns. In the Maps component, the following `WAI-ARIA` attributes are used:
To meet accessibility standards, the Blazor Maps component adheres to [WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/) patterns. The following `WAI-ARIA` attributes are used in the Maps component:

| Attributes | Purpose |
| --- | --- |
| `role=region` | It specifies the Maps areas that do not support interactive functions like selection and highlight. |
| `role=button` | It specifies the Maps areas where interactive functions such as selection and highlight are available. |
| `aria-label` | Provides an accessible name for Maps elements such as geometric map shapes, title, subtitle, legend title, legend item labels, data labels, and so on. To learn more, see the next topic. |
| `role=region` | Identifies map areas that do not support interactive functions such as selection and highlighting. |
| `role=button` | Identifies map areas where interactive functions such as selection and highlighting are available. |
| `aria-label` | Provides accessible names for map elements including geometric shapes, title, subtitle, legend title, legend item labels, and data labels. See the next section for details. |

## Screen reading in Maps

Accessibility in the Blazor Maps component ensures that all users, regardless of ability or disability, can use screen reading. The following Map elements will be read aloud using screen reading software, such as Narrator for Windows.
Accessibility in the Blazor Maps component ensures compatibility with screen readers. The following map elements are announced by screen readers such as Narrator on Windows.

| Elements | Description |
| --- | --- |
| Shapes in the layer | Reads the names of the geographical shapes (such as countries, states, and regions) that appear on the Maps. |
| Title | Reads the title content in the Maps. |
| Subtitle | Reads the title below the main title content in the Maps. |
| Legend title | Reads the contents of the legend's title as specified in Maps. |
| Legend item label | Reads the label of a legend item in Maps. |
| Data label | Reads the label specified for the shapes in the Maps layer. |
| Annotation | Reads the content specified in the annotation. |
| Marker template | Reads the content provided in the marker template. |
| Tooltip template | Reads the content provided in the tooltip template. |
| Data label template | Reads the content provided in the data label template. |
| Shapes in the layer | Announces the names of the geographical shapes (such as countries, states, and regions) displayed on the map. |
| Title | Announces the map title. |
| Subtitle | Announces the subtitle that appears below the main title. |
| Legend title | Announces the legend title as configured in the map. |
| Legend item label | Announces the label of each legend item. |
| Data label | Announces the label specified for shapes in the map layer. |
| Annotation | Announces the content defined in the annotation. |
| Marker template | Announces the content provided in the marker template. |
| Tooltip template | Announces the content provided in the tooltip template. |
| Data label template | Announces the content provided in the data label template. |

## Keyboard Navigation

All the Blazor Maps actions can be controlled via keyboard keys. The applicable key combinations and their relative functionalities are listed below for the appropriate UI features available in the component.
All Blazor Maps actions can be controlled using the keyboard. The following key combinations apply to the available UI interactions.

| Windows | Mac | Description|
|-----|-----|----|
|<kbd>Tab</kbd> | <kbd>Tab</kbd> |Moves to the next focusable element on the map, such as the legend or shape.|
|<kbd>Shift</kbd> + <kbd>Tab</kbd> | <kbd>⇧</kbd> + <kbd>Tab</kbd> |Moves to the previous focusable element on the map, such as the legend or shape.|
|<kbd> + </kbd> | <kbd>+</kbd> |When zooming is enabled, zoom in operation can be performed.|
|<kbd> - </kbd> | <kbd>-</kbd> |When zooming is enabled, zoom out operation can be performed.|
|<kbd>←</kbd> | <kbd>←</kbd> |When zoomed in, the map can be scrolled to the left.|
|<kbd>→</kbd> | <kbd>→</kbd> |When zoomed in, the map can be scrolled to the right.|
|<kbd>↑</kbd> | <kbd>↑</kbd> |When zoomed in, the map can be scrolled upward.|
|<kbd>↓</kbd> | <kbd>↓</kbd> |When zoomed in, the map can be scrolled downward.|
|<kbd> R </kbd> | <kbd>R</kbd> |When zooming is enabled, reset operation can be performed.|
|<kbd>Enter</kbd> | <kbd>Enter</kbd> |The page can be navigated to the next and previous states in legend. Similarly, the selection can be made while navigating over the shape.|
|<kbd>Tab</kbd> | <kbd>Tab</kbd> |Moves focus to the next focusable element on the map, such as the legend or a shape.|
|<kbd>Shift</kbd> + <kbd>Tab</kbd> | <kbd>⇧</kbd> + <kbd>Tab</kbd> |Moves focus to the previous focusable element on the map, such as the legend or a shape.|
|<kbd> + </kbd> | <kbd>+</kbd> |Performs zoom in when zooming is enabled.|
|<kbd> - </kbd> | <kbd>-</kbd> |Performs zoom out when zooming is enabled.|
|<kbd>←</kbd> | <kbd>←</kbd> |When zoomed in, scrolls the map to the left.|
|<kbd>→</kbd> | <kbd>→</kbd> |When zoomed in, scrolls the map to the right.|
|<kbd>↑</kbd> | <kbd>↑</kbd> |When zoomed in, scrolls the map upward.|
|<kbd>↓</kbd> | <kbd>↓</kbd> |When zoomed in, scrolls the map downward.|
|<kbd> R </kbd> | <kbd>R</kbd> |Performs reset when zooming is enabled.|
|<kbd>Enter</kbd> | <kbd>Enter</kbd> |Navigates through legend items and confirms selection when focusing a shape.|

## Ensuring accessibility

The Blazor Maps component's accessibility levels are ensured using an [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) software tool during automated testing.
Accessibility compliance for the Blazor Maps component is validated using [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) software tool during automated testing.

The accessibility compliance of the Maps component is shown in the following sample. Open the [sample](https://blazor.syncfusion.com/accessibility/maps) in a new window to evaluate the accessibility of the Maps component with accessibility tools.
The component’s accessibility compliance is demonstrated in the following sample. Open the [sample](https://blazor.syncfusion.com/accessibility/maps) in a new window to evaluate the component with accessibility tools.
26 changes: 18 additions & 8 deletions blazor/maps/annotations.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
---
layout: post
title: Annotations in Blazor Maps Component | Syncfusion
description: Checkout and learn here all about annotations in Blazor Maps component of Syncfusion, and more details.
description: Check out and learn how to add, configure and personalize annotations in the Syncfusion Blazor Maps component.
platform: Blazor
control: Maps
documentation: ug
---

# Annotations in Blazor Maps component

Annotations are used to mark the specific area of interest in the Maps with texts, shapes, or images. Any number of annotations can be added to the Maps component.
Annotations mark areas of interest on the map using text, shapes, or images. Any number of annotations can be added to the Maps component.

## Annotation

By using the `ContentTemplate` property of [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html), text content or an HTML element can be specified to render a new HTML element in Maps.
Use the `ContentTemplate` property of [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html) to render text content or an HTML element as an annotation in Maps.

```cshtml

@using Syncfusion.Blazor.Maps

<SfMaps>
Expand All @@ -34,6 +35,7 @@ By using the `ContentTemplate` property of [MapsAnnotation](https://help.syncfus
</MapsLayer>
</MapsLayers>
</SfMaps>

```

![Blazor Maps with Annotation](./images/Annotation/blazor-maps-annotation.PNG)
Expand All @@ -42,9 +44,10 @@ By using the `ContentTemplate` property of [MapsAnnotation](https://help.syncfus

### Changing the z-index

The stack order of an annotation element can be changed using the [ZIndex](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_ZIndex) property in the [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html).
Change the stacking order of an annotation element using the [ZIndex](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_ZIndex) property of [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html).

```cshtml

@using Syncfusion.Blazor.Maps

<SfMaps>
Expand All @@ -63,15 +66,17 @@ The stack order of an annotation element can be changed using the [ZIndex](http
</MapsLayer>
</MapsLayers>
</SfMaps>

```

![Changing ZIndex in Blazor Maps Annotation](./images/Annotation/blazor-maps-annotation-zindex.PNG)

### Positioning an annotation

Annotations can be placed anywhere in the Maps by specifying percentage values to the [X](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_X) and [Y](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_Y) properties in the [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html).
Place annotations anywhere on the map by specifying percentage values for the [X](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_X) and [Y](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_Y) properties of [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html).

```cshtml

@using Syncfusion.Blazor.Maps

<SfMaps>
Expand All @@ -90,15 +95,17 @@ Annotations can be placed anywhere in the Maps by specifying percentage values t
</MapsLayer>
</MapsLayers>
</SfMaps>

```

![Changing Annotation Position in Blazor Maps](./images/Annotation/blazor-maps-annotation-position.PNG)

### Alignment of an annotation

Annotations can be aligned using the [HorizontalAlignment](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_HorizontalAlignment) and [VerticalAlignment](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_VerticalAlignment) properties in the [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html). The possible values can be [**Center**](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.AnnotationAlignment.html#Syncfusion_Blazor_Maps_AnnotationAlignment_Center), [**Far**](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.AnnotationAlignment.html#Syncfusion_Blazor_Maps_AnnotationAlignment_Far), [**Near**](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.AnnotationAlignment.html#Syncfusion_Blazor_Maps_AnnotationAlignment_Near) and [**None**](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.AnnotationAlignment.html#Syncfusion_Blazor_Maps_AnnotationAlignment_None).
Align annotations using the [HorizontalAlignment](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_HorizontalAlignment) and [VerticalAlignment](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html#Syncfusion_Blazor_Maps_MapsAnnotation_VerticalAlignment) properties of [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html). Possible values: [Center](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.AnnotationAlignment.html#Syncfusion_Blazor_Maps_AnnotationAlignment_Center), [Far](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.AnnotationAlignment.html#Syncfusion_Blazor_Maps_AnnotationAlignment_Far), [Near](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.AnnotationAlignment.html#Syncfusion_Blazor_Maps_AnnotationAlignment_Near) and [None](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.AnnotationAlignment.html#Syncfusion_Blazor_Maps_AnnotationAlignment_None).

```cshtml

@using Syncfusion.Blazor.Maps

<SfMaps>
Expand All @@ -117,15 +124,17 @@ Annotations can be aligned using the [HorizontalAlignment](https://help.syncfusi
</MapsLayer>
</MapsLayers>
</SfMaps>

```

![Changing Alignment of Blazor Maps Annotation](./images/Annotation/blazor-maps-annotation-alignment.PNG)

## Multiple Annotation

Multiple annotations can be added to the Maps by adding multiple [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html) in the [MapsAnnotations](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotations.html) and customization for the annotations can be done with the [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html).
Add multiple annotations by including multiple [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html) elements within [MapsAnnotations](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotations.html). Customize each annotation using the [MapsAnnotation](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Maps.MapsAnnotation.html) properties.

```cshtml

@using Syncfusion.Blazor.Maps

<SfMaps>
Expand All @@ -151,6 +160,7 @@ Multiple annotations can be added to the Maps by adding multiple [MapsAnnotation
</MapsLayer>
</MapsLayers>
</SfMaps>

```

![Blazor Maps with Multiple Annotation](./images/Annotation/blazor-maps-multiple-annotation.PNG)
![Blazor Maps with Multiple Annotation](./images/Annotation/blazor-maps-multiple-annotation.PNG)
Loading