Yii DataView version 1.3.0 was released. In this version:
- Add
GridView::keepColumnAttributesInEmptyCell()to keep column body cell attributes on empty cells - Add
GridView::filterRowAttributes(), andfilterAttributesandfilterClassparameters toDataColumnto set HTML attributes and a CSS class for filter cells - Add
GridViewmethodssortableHeaderClass(),sortableHeaderAscClass(),sortableHeaderDescClass(),sortableLinkAscClass()andsortableLinkDescClass()to configure CSS classes for sortable column headers and links - Add
GridView::captionAttributes()method and$attributesparameter toGridView::caption()to set HTML attributes for thecaptiontag - Add
OffsetPagination::currentLinkAttributes()anddisabledLinkAttributes(), andKeysetPagination::disabledLinkAttributes()to set HTML attributes for the current page link or a disabled control, layered on top oflinkAttributes() - Add
BaseListView::accessibility()that opts into automatically added accessibility attributes:scope="col"andaria-sortonGridViewheader cells,scope="row"on row header cells, andaria-current,aria-disabled,aria-labelandrole="link"on pagination links — and arowHeaderparameter toDataColumnthat renders the column's body cells as<th>row headers - Add
ariaLabelNav(),ariaLabelFirst(),ariaLabelPrevious(),ariaLabelNext(),ariaLabelLast()andariaLabelPage()methods toOffsetPagination, andariaLabelNav(),ariaLabelPrevious()andariaLabelNext()toKeysetPagination, to setaria-labelon thenavcontainer and page links - Add
$accessibility,$translatorand$translationCategoryparameters to thePaginationContextconstructor and toOffsetPagination::create()andKeysetPagination::create(), and aPaginationContext::translate()method - Make dependency container in
GridViewconstructor optional - Render disabled
KeysetPaginationcontrols ("previous" on the first page, "next" on the last page) asspanelements instead ofaelements without anhref - Render disabled
OffsetPaginationcontrols ("first"/"previous" on the first page, "next"/"last" on the last page) asspanelements instead of clickableaelements - Keep
GridViewand column header cell attributes when a column renders no header