Skip to content

Commit

Permalink
Accessibility improved for content toggled
Browse files Browse the repository at this point in the history
  • Loading branch information
Simounet committed Jan 10, 2019
1 parent 7d2cd7b commit 754bf46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion article.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<header class="article__header js-article__header">
{if="isset($value->favicon)"}{$value->favicon}{/if}
<span class="article__feed-title">{$value->feedName}</span>
<h1 class="article__title js-article__title"><a href="{$value->getLink()}" target="_blank">{$value->getTitle()}</a></h1>
<h1 class="article__title js-article__title" tabindex="0"><a href="{$value->getLink()}" target="_blank">{$value->getTitle()}</a></h1>
<span class="article__description">{function="Functions::truncate(strip_tags($value->getDescription()),300)"}</span>
{if="$articleDisplayDate"}
<span class="article__date" title="{$value->dateTitle}"{if="$value->dateLessThanOneHour"} data-timestamp="{$value->getPubdate()}"{/if}>{$value->dateValue}</span>
Expand Down
6 changes: 4 additions & 2 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ $(function () {

anonymousState = $('[data-anonymous-state]').data('anonymous-state');

$('.wrapper').on('click', '.js-event', function (event) {
eventObj = new EventObject(event);
$('.wrapper').on('click keypress', '.js-event', function (event) {
if (event.type === 'click' || event.which === 13) {
eventObj = new EventObject(event);
}
});

$('.js-toggle-button').click(function () {
Expand Down

0 comments on commit 754bf46

Please sign in to comment.