-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] improve news list accessibility (#343)
* [FEATURE] improve news list accessibility Use MediaViewhelper for News images Add aria labels and nav-tag to paginatior Wrap a news item with an article-tag like in SimpleList * remove position rule to enable focus definition
- Loading branch information
Showing
7 changed files
with
135 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
Resources/Private/Extensions/News/Templates/ViewHelpers/Widget/Paginate/Index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" | ||
xmlns:n="http://typo3.org/ns/GeorgRinger/News/ViewHelpers" | ||
data-namespace-typo3-fluid="true"> | ||
|
||
<f:if condition="{configuration.insertAbove}"> | ||
<f:render section="paginator" arguments="{pagination: pagination,configuration:configuration}" /> | ||
</f:if> | ||
|
||
<f:renderChildren arguments="{contentArguments}" /> | ||
|
||
<f:if condition="{configuration.insertBelow}"> | ||
<f:render section="paginator" arguments="{pagination: pagination,configuration:configuration}" /> | ||
</f:if> | ||
|
||
<f:section name="paginator"> | ||
<f:if condition="{pagination.numberOfPages} > 1"> | ||
<f:if condition="{settings.list.paginate}"> | ||
<f:if condition="{pagination.previousPage}"> | ||
<f:if condition="{pagination.previousPage} > 1"> | ||
<f:then> | ||
<n:headerData><link rel="prev" href="{f:widget.uri(arguments: {currentPage: pagination.previousPage}) -> f:format.htmlentities()}" /></n:headerData> | ||
</f:then> | ||
<f:else> | ||
<n:headerData><link rel="prev" href="{f:widget.uri() -> f:format.htmlentities()}" /></n:headerData> | ||
</f:else> | ||
</f:if> | ||
</f:if> | ||
<f:if condition="{pagination.nextPage}"> | ||
<n:headerData><link rel="next" href="{f:widget.uri(arguments: {currentPage: pagination.nextPage}) -> f:format.htmlentities()}" /></n:headerData> | ||
</f:if> | ||
</f:if> | ||
|
||
<nav aria-label="{f:translate(key:'paginate.list.ariaLabel', extensionName:'Theme_t3kit')}"> | ||
<div class="page-navigation"> | ||
<p> | ||
<f:translate key="paginate_overall" arguments="{0:pagination.current,1:pagination.numberOfPages}" /> | ||
</p> | ||
<ul class="f3-widget-paginator"> | ||
<f:if condition="{pagination.previousPage}"> | ||
<li class="previous"> | ||
<f:if condition="{pagination.previousPage} > 1"> | ||
<f:then> | ||
<f:widget.link addQueryStringMethod="GET" arguments="{currentPage: pagination.previousPage}"> | ||
<f:translate key="paginate_previous" /> | ||
</f:widget.link> | ||
</f:then> | ||
<f:else> | ||
<f:widget.link addQueryStringMethod="GET"> | ||
<f:translate key="paginate_previous" /> | ||
</f:widget.link> | ||
</f:else> | ||
</f:if> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.displayRangeStart} > 1"> | ||
<li class="first"> | ||
<f:widget.link addQueryStringMethod="GET">1</f:widget.link> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.hasLessPages}"> | ||
<li>....</li> | ||
</f:if> | ||
<f:for each="{pagination.pages}" as="page"> | ||
<f:if condition="{page.isCurrent}"> | ||
<f:then> | ||
<li class="current"> | ||
<span aria-current="true" aria-label="{f:translate(key:'paginate.page.ariaLabel', extensionName:'Theme_t3kit')} {page.number}">{page.number}</span> | ||
</li> | ||
</f:then> | ||
<f:else> | ||
<li> | ||
<f:if condition="{page.number} > 1"> | ||
<f:then> | ||
<f:widget.link addQueryStringMethod="GET" arguments="{currentPage: page.number}">{page.number}</f:widget.link> | ||
</f:then> | ||
<f:else> | ||
<f:widget.link addQueryStringMethod="GET">{page.number}</f:widget.link> | ||
</f:else> | ||
</f:if> | ||
</li> | ||
</f:else> | ||
</f:if> | ||
</f:for> | ||
<f:if condition="{pagination.hasMorePages}"> | ||
<li>....</li> | ||
</f:if> | ||
<f:if condition="{pagination.displayRangeEnd} < {pagination.numberOfPages}"> | ||
<li class="last"> | ||
<f:widget.link addQueryStringMethod="GET" arguments="{currentPage: pagination.numberOfPages}">{pagination.numberOfPages}</f:widget.link> | ||
</li> | ||
</f:if> | ||
<f:if condition="{pagination.nextPage}"> | ||
<li class="last next"> | ||
<f:widget.link addQueryStringMethod="GET" arguments="{currentPage: pagination.nextPage}"> | ||
<f:translate key="paginate_next" /> | ||
</f:widget.link> | ||
</li> | ||
</f:if> | ||
</ul> | ||
</div> | ||
<div class="news-clear"></div> | ||
</nav> | ||
</f:if> | ||
</f:section> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters