The basically SVG XML document node, it can be tweaks on the style by using CSS
SvgElement
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| Create | 1 | create svg element based on the given XmlElement.Name |
| GetClasses | 1 | |
| HasClass | 1 | |
| AddClass | 1 | |
| RemoveClass | 1 | |
| ToggleClass | 1 | |
| SetStyle | 1 | |
| SetAttributeData | 1 | |
| GetSvgElement | 1 | |
| ToString | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| Id | 1 | html element node id liked identifer |
| Stroke | 1 | the stroke color, value of this property should be html color code |
| StrokeDashArray | 1 | The stroke-dasharray attribute is a presentation attribute defining the pattern of dashes and gaps used to paint the outline of the shape; |
| Style | 1 | current element node css style |
| AriaLabel | 1 | The aria-label attribute is part of the Accessible Rich Internet Applications (ARIA) specification, which is designed to make web content and web applications more accessible to p… |
| Attribute | 1 | get/set of the xml attribute value of current svg element. |
| Tag | 1 | get the xml tag name of current svg element |
| TabIndex | 1 | |
| Fill | 1 | |
| FillOpacity | 1 | |
| StrokeOpacity | 1 | |
| StrokeWidth | 1 | |
| StrokeLineCap | 1 | |
| Transform | 1 | |
| Visible | 1 |
04 Members
XmlElement)create svg element based on the given XmlElement.Name
| Name | Type | Description |
|---|---|---|
e | XmlElement | - |
html element node id liked identifer
the stroke color, value of this property should be html color code
The stroke-dasharray attribute is a presentation attribute defining the pattern of dashes and gaps used to paint the outline of the shape;
current element node css style
The aria-label attribute is part of the Accessible Rich Internet Applications (ARIA) specification, which is designed to make web content and web applications more accessible to people with disabilities. Here's an overview of the aria-label attribute:
Purpose:
- The
aria-labelattribute is used to provide a text label for an element that is not otherwise labeled through text content or other attributes likearia-labelledby. - It is particularly useful for elements that do not have a visible text label, such as icons, buttons, or other interactive elements.
Usage:
- The value of the
aria-labelattribute is a string that contains the text label for the element. - This text label is intended to be read by assistive technologies like screen readers, which can announce the label to users who cannot see the screen.
Example:
<button aria-label="Close">×<!-- This is an icon representing a close action --></button>
In this example, a screen reader would announce "Close" when the user navigates to the button, even though the visible content of the button is just an "×" symbol.
Benefits:
- Improves accessibility by providing a clear description of the element's purpose or content.
- Allows developers to create more semantic and accessible user interfaces without relying on off-screen text or other less semantic methods.
Considerations:
- The
aria-labelshould be concise and descriptive. - It should not duplicate text that is already provided in the visible content of the element.
- Avoid using
aria-labelfor elements that already have a text label visible on the screen, as this can cause redundancy for screen reader users.
Compatibility:
- The
aria-labelattribute is supported by most modern web browsers and assistive technologies.
String)get/set of the xml attribute value of current svg element.
| Name | Type | Description |
|---|---|---|
name | String | - |
The value of the specified attribute. An empty string is returned if a matching attribute is not found or if the attribute does not have a specified or default value.
get the xml tag name of current svg element
the tag name string in lower case
String)String)String)String)String, String)String, String)