Accessibility¶
Accessibility attributes are included in the exported html by default. Here is an example of how to set the aria-label attribute on the exported table:
This results in:
If you don't want to include accessibility attributes in the html, set the property below to false:
Via the exporter's Settings.Accessibility.TableSettings property you can set the following attributes:
| EPPlus attribute | Html attribute | Html element | Default value |
|---|---|---|---|
AriaLabel |
aria-label | table | null |
AriaLabelledBy |
aria-labelledby | table | null |
AriaDescribedBy |
aria-describedby | table | null |
TableRole |
role | table | table |
TheadRole |
role | table.thead | rowgroup |
TbodyRole |
role | table.tbody | rowgroup |
TfootRole |
role | table.tfoot | rowgroup |
TableHeaderCellRole |
role | table.thead.tr.th | columnheader |