Skip to content

Commit

Permalink
fixed naviagtion label and aria current attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Kuhn committed Apr 8, 2018
1 parent a983689 commit dc953a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Resources/Private/Fusion/Component/Pagination.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ prototype(Breadlesscode.Listable:Pagination) < prototype(Neos.Fusion:Component)
paginationConfig = ${ [] }

@process.wrapPaginationUl = ${ '<ul class="pagination">' + value + '</ul>' }
@process.wrapPaginationNav = ${ '<nav role="navigation" aria-label="Pagination Navigation">' + value + '</nav>' }
@process.wrapPaginationNav = ${ '<nav role="navigation" aria-label="' + Translation.translate('Breadlesscode.Listable:Accessibility:label') + '">' + value + '</nav>' }
@if.hasOnlyOnePage = ${ this.totalCount > this.itemsPerPage }

renderer = Neos.Fusion:Collection {
Expand All @@ -19,7 +19,7 @@ prototype(Breadlesscode.Listable:Pagination) < prototype(Neos.Fusion:Component)
}
itemRenderer = Breadlesscode.Listable:PaginationItem {
page = ${ item.page }
isCurrent = ${ props.currentPage == item.page }
isCurrent = ${ String.toInteger(props.currentPage) == String.toInteger(item.page) }
uri = Neos.Neos:NodeUri {
node = ${ documentNode }
additionalParams = Neos.Fusion:RawArray {
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Fusion/Component/PaginationItem.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ prototype(Breadlesscode.Listable:PaginationItem) < prototype(Neos.Fusion:Compone
[email protected] = ${ props.uri ? true : false }

aria-current= ${ "true" }
[email protected] = ${ props.isCurrent }
[email protected] = ${ props.isCurrent ? true : false }
}

@process.itemWrap = Neos.Fusion:Tag {
Expand Down

0 comments on commit dc953a4

Please sign in to comment.