TableSortable Class
An extension for A.Plugin.Aria that creates and synchronizes a
screen-reader-friendly caption element for the table that
has sortable headers.
Constructor
TableSortable
-
config
Parameters:
-
configObjectObject literal specifying widget configuration properties.
Methods
_afterCaptionVisibleChange
-
event
Handles captionVisible events.
Parameters:
-
eventEventFacade
_getCaption
()
protected
Returns a reference to the captionNode, and accomplishes
necessary setup to prepare the element for screen readers.
_toggleScreenReaderClass
()
protected
Toggles the screen reader CSS class.
initializer
()
protected
Construction logic executed during TableSortable instantiation. Lifecycle.
syncCaption
-
columnName -
ascending
Synchronizes the captionNode's text for screen readers with the sorted column and its sort direction.
Parameters:
-
columnNameString -
ascendingBoolean
Properties
ATTRS
Object
static
Configuration for TableSortable.
W3C_ROLES
Object
static
Static property used to define [W3C's Roles Model](http://www.w3.org/TR/wai- aria/roles).
Attributes
screenReaderClass
String
The class to used to hide the caption element but leave readable for screen readers.
Default: 'sr-only'