Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XRLabel.AccessibleRole Property

Specifies the role of XRLabel and XRTableCell in the exported PDF document. This value is used by assistive technologies.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.Core

#Declaration

[Browsable(true)]
public override XRAccessibleRole AccessibleRole { get; set; }

#Property Value

Type Description
XRAccessibleRole

The value that defines the XRLabel role.

Available values:

Name Description
Default

Applies no semantic meaning to the UI element.

Heading1

Applies “level one heading” meaning to an XRLabel.

Heading2

Applies “level two heading” meaning to an XRLabel.

Heading3

Applies “level three heading” meaning to an XRLabel.

Heading4

Applies “level four heading” meaning to an XRLabel.

Heading5

Applies “level five heading” meaning to an XRLabel.

Heading6

Applies “level six heading” meaning to an XRLabel.

Table

Applies “table” meaning to an XRTable.

TableHeaderRow

Applies “header row” meaning to an XRTableRow.

TableHeaderCell

Applies “header cell” meaning to an XRTableCell.

#Remarks

You can specify how XRLabel and XRTableCell should be treated by screen readers in the exported PDF document.

#Define XRLabel Accessible Role

Set the control’s AccessibleRole property to Heading1 - Heading6 before you export a report.

Set AccessibleRole in Property Grid

Set the PdfExportOptions.PdfUACompatibility property to PdfUA1 to conform the exported PDF document to PDF/UA specification. Then, export the report to PDF format.

The image below shows the result. XRLabel.AccessibleRole is set to Heading2, and the screen reader treats XRLabel as a “level two” heading in the exported document:

Exported report in the screen reader

#Define XRTableCell Accessible Role

Before you export a report, set the XRTable‘s AccessibleRole property to Table to define a control as a table. Then, specify the XRTableCell.AccessibleRole property:

Set AccessibleRole in Property Grid

Note

AccessibleRole is not in effect for cells merged with the XRTableCell.RowSpan property.

Set the PdfExportOptions.PdfUACompatibility property to PdfUA1 to conform the exported PDF document to PDF/UA specification. Then, export the report to PDF format.

The image below shows the result. XRTableCell.AccessibleRole is set to TableHeaderCell, and the screen reader treats XRTableCell with “Bill to:” text as a header cell in the exported document:

Exported report in the screen reader

See Also