Skip to content

Commit

Permalink
8.2.14
Browse files Browse the repository at this point in the history
- D8CORE-4396: changes to remove focus for accessibility reason (#129) (1cb360d)
- D8CORE-4508: adding skip to main on the topic menu (#128) (9aad0b9)
- D8CORE-4378: adding the skip to secondary link (#127) (64297c2)
  • Loading branch information
pookmish authored Jul 9, 2021
2 parents fd26664 + 53e40fa commit b76f98d
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Stanford News

8.x-2.14
--------------------------------------------------------------------------------
_Release Date: 2021-07-09_

- D8CORE-4396: changes to remove focus for accessibility reason (#129) (1cb360d)
- D8CORE-4508: adding skip to main on the topic menu (#128) (9aad0b9)
- D8CORE-4378: adding the skip to secondary link (#127) (64297c2)

8.x-2.13
--------------------------------------------------------------------------------
_Release Date: 2021-06-11_
Expand Down
2 changes: 1 addition & 1 deletion dist/js/news-list.behaviors.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/news-node.behaviors.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions lib/js/stanford_news_list.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export default {
// Attach Drupal Behavior.
attach(context, settings) {
(function ($) {

// Remove the alt text on list image.
$('.su-news-article img', context).attr('alt', '');

$('.news-topics__collapsable-menu', context).click(function() {
$(this).toggleClass('show');
if ($(this).siblings('.menu').css('display') != 'none') {
Expand Down
2 changes: 1 addition & 1 deletion stanford_news.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: module
description: 'Stanford news items and views.'
core_version_requirement: ^8.8 || ^9
package: Stanford
version: 8.x-2.13
version: 8.x-2.14
dependencies:
- allowed_formats:allowed_formats
- auto_entitylabel:auto_entitylabel
Expand Down
2 changes: 2 additions & 0 deletions templates/block/block--menu-block--news-topics.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
{% set attributes = attributes.setAttribute('aria-labelledby', button_label) %}
{% set attributes = attributes.addClass(classes) %}

<a href="#main-content" class="visually-hidden focusable su-skipnav su-skipnav--content">{{ 'Skip to main content'|t }}</a>
<nav{{ attributes }}>
<div id="secondary-navigation" tabindex="-1" class="visually-hidden focusable">{{ 'Secondary Navigation'|t }}</div>
{# Label. If not displayed, we still provide it for screen readers. #}
{% if not configuration.label_display %}
{% set title_attributes = title_attributes.addClass('visually-hidden') %}
Expand Down
2 changes: 1 addition & 1 deletion templates/components/news-list/news-item-list.twig
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
{# Add the image and link only if they both exist. #}
{% if news_list_image|render|striptags('<drupal-render-placeholder><img><picture>')|trim is not empty -%}
{%- if news_url is not empty -%}
<a {{ news_url_attributes }} href="{{ news_url }}" aria-hidden="true">
<a {{ news_url_attributes }} href="{{ news_url }}" aria-hidden="true" tabindex="-1">
{%- endif -%}
{{- news_list_image -}}
{%- if news_url is not empty -%}
Expand Down

0 comments on commit b76f98d

Please sign in to comment.