ARIA
Namespace: Wisej.Web.Ext.WebARIA
Assembly: Wisej.Web.Ext.WebARIA (4.1.0.0)
Represents the WAI-ARIA properties associated to a Control by the WebARIA extender.
- C#
- VB.NET
public class ARIA
Public Class ARIA
Instances are created by GetAria. Each property that is set (not NotSet, null or empty) is rendered as the corresponding aria-* attribute on the control's accessibility element.
Properties
DescribedBy
Control: Returns or sets the control that describes the element (aria-describedby). (Default: null)
Example:
Associating a hint label with a password field:
this.webARIA1.GetAria(this.textBoxPassword).DescribedBy = this.labelPasswordRules;
Expanded
TriState: Returns or sets whether the element is expanded (aria-expanded). (Default: NotSet)
Hidden
TriState: Returns or sets whether the element is hidden from assistive technologies (aria-hidden). (Default: NotSet)
Label
String: Returns or sets the accessible label of the element (aria-label). (Default: "")
Setting it to null is the same as setting it to an empty string, which omits the attribute.
LabeledBy
Control: Returns or sets the control that labels the element (aria-labelledby). (Default: null)
Example:
Associating a label with a text box:
this.webARIA1.GetAria(this.textBoxName).LabeledBy = this.labelName;
ReadOnly
TriState: Returns or sets whether the element is read only (aria-readonly). (Default: NotSet)
Required
TriState: Returns or sets whether a value is required (aria-required). (Default: NotSet)
Selected
TriState: Returns or sets whether the element is selected (aria-selected). (Default: NotSet)
ValueMax
Nullable<Int32>: Returns or sets the maximum value of a range widget (aria-valuemax). (Default: null)
Set to null to omit the attribute. See ValueNow for an example.
ValueMin
Nullable<Int32>: Returns or sets the minimum value of a range widget (aria-valuemin). (Default: null)
Set to null to omit the attribute. See ValueNow for an example.
ValueNow
Nullable<Int32>: Returns or sets the current value of a range widget (aria-valuenow). (Default: null)
Use together with ValueMin and ValueMax; set to null to omit the attribute.
Example:
Describing a custom progress indicator:
var aria = this.webARIA1.GetAria(this.panelProgress);
aria.ValueMin = 0;
aria.ValueMax = 100;
aria.ValueNow = 45;
aria.ValueText = "45 percent completed";
ValueText
String: Returns or sets the human readable text alternative of the current value (aria-valuetext). (Default: "")
Setting it to null is the same as setting it to an empty string, which omits the attribute.