From 27e00e5bcef7bcf403c59ca7cf5005ae157266f6 Mon Sep 17 00:00:00 2001 From: "sws-developers@lists.stanford.edu" Date: Fri, 11 Jun 2021 18:07:56 +0000 Subject: [PATCH 1/5] Back to dev --- composer.json | 4 ++-- stanford_news.info.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index a552e579..eb333347 100644 --- a/composer.json +++ b/composer.json @@ -99,7 +99,7 @@ "drupal/views_infinite_scroll": "^1.6", "drupal/views_taxonomy_term_name_depth": "^7.0", "su-sws/drupal-patches": "^8.0", - "su-sws/jumpstart_ui": "^8.1", - "su-sws/stanford_text_editor": "^8.1" + "su-sws/jumpstart_ui": "dev-8.x-1.x", + "su-sws/stanford_text_editor": "dev-8.x-1.x" } } diff --git a/stanford_news.info.yml b/stanford_news.info.yml index 2723918c..18035629 100644 --- a/stanford_news.info.yml +++ b/stanford_news.info.yml @@ -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-dev dependencies: - allowed_formats:allowed_formats - auto_entitylabel:auto_entitylabel From 64297c27eee528c8a553c549999dd463cfaa9f92 Mon Sep 17 00:00:00 2001 From: Jen Breese Date: Tue, 22 Jun 2021 16:48:44 -0700 Subject: [PATCH 2/5] D8CORE-4378: adding the skip to secondary link (#127) * D8CORE-4378: adding the skip to secondary link * D8CORE-4378: fixup and remove the extra name attribute that gives html val errors --- templates/block/block--menu-block--news-topics.html.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/block/block--menu-block--news-topics.html.twig b/templates/block/block--menu-block--news-topics.html.twig index a40bf2bf..43c0397c 100644 --- a/templates/block/block--menu-block--news-topics.html.twig +++ b/templates/block/block--menu-block--news-topics.html.twig @@ -47,6 +47,7 @@ {% set attributes = attributes.addClass(classes) %} +
{{ 'Secondary Navigation'|t }}
{# Label. If not displayed, we still provide it for screen readers. #} {% if not configuration.label_display %} {% set title_attributes = title_attributes.addClass('visually-hidden') %} From 9aad0b9b2234c37b40b6a31ee2355602857d1450 Mon Sep 17 00:00:00 2001 From: Jen Breese Date: Tue, 6 Jul 2021 09:27:21 -0700 Subject: [PATCH 3/5] D8CORE-4508: adding skip to main on the topic menu (#128) --- templates/block/block--menu-block--news-topics.html.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/block/block--menu-block--news-topics.html.twig b/templates/block/block--menu-block--news-topics.html.twig index 43c0397c..6796d67a 100644 --- a/templates/block/block--menu-block--news-topics.html.twig +++ b/templates/block/block--menu-block--news-topics.html.twig @@ -46,6 +46,7 @@ {% set attributes = attributes.setAttribute('aria-labelledby', button_label) %} {% set attributes = attributes.addClass(classes) %} +{{ 'Skip to main content'|t }}
{{ 'Secondary Navigation'|t }}
{# Label. If not displayed, we still provide it for screen readers. #} From 1cb360d4a58233b2a1f0af3d7018a0b095ced6ac Mon Sep 17 00:00:00 2001 From: Jen Breese Date: Thu, 8 Jul 2021 21:27:25 -0700 Subject: [PATCH 4/5] D8CORE-4396: changes to remove focus for accessibility reason (#129) * D8CORE-4396: changes to remove focus for accessibilty reasons --- dist/js/news-list.behaviors.js | 2 +- dist/js/news-node.behaviors.js | 2 +- lib/js/stanford_news_list.behavior.js | 4 ++++ templates/components/news-list/news-item-list.twig | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dist/js/news-list.behaviors.js b/dist/js/news-list.behaviors.js index 573cfe1c..e225daff 100644 --- a/dist/js/news-list.behaviors.js +++ b/dist/js/news-list.behaviors.js @@ -1,2 +1,2 @@ -!function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=4)}({4:function(e,t,n){"use strict";n.r(t);t=n(5)},5:function(e,t,n){window.Drupal.behaviors.stanford_news_list={attach:function(e,t){var n;(n=jQuery)(".news-topics__collapsable-menu",e).click(function(){n(this).toggleClass("show"),"none"!=n(this).siblings(".menu").css("display")?n(this).attr("aria-expanded","true"):n(this).attr("aria-expanded","false")})}}}}); +!function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=4)}({4:function(e,t,n){"use strict";n.r(t);n(5)},5:function(e,t,n){window.Drupal.behaviors.stanford_news_list={attach:function(e,t){var n;(n=jQuery)(".su-news-article img",e).attr("alt",""),n(".news-topics__collapsable-menu",e).click(function(){n(this).toggleClass("show"),"none"!=n(this).siblings(".menu").css("display")?n(this).attr("aria-expanded","true"):n(this).attr("aria-expanded","false")})}}}}); //# sourceMappingURL=news-list.behaviors.js.map \ No newline at end of file diff --git a/dist/js/news-node.behaviors.js b/dist/js/news-node.behaviors.js index 89a404ca..089da1c0 100644 --- a/dist/js/news-node.behaviors.js +++ b/dist/js/news-node.behaviors.js @@ -1,2 +1,2 @@ -!function(t){var a={};function n(e){if(a[e])return a[e].exports;var r=a[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=a,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(r,e){if(1&e&&(r=n(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var a in r)n.d(t,a,function(e){return r[e]}.bind(null,a));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=0)}([function(e,r,t){"use strict";t.r(r);r=t(1)},function(e,r,t){window.Drupal.behaviors.stanford_news={attach:function(s,e){!function(e){e(".news-social-media",s).prepend('"),e(".news-social-media",s).prepend('"),e(".news-social-media",s).prepend('"),e(".news-social-media",s).prepend('"),e(".news-social-media",s).prepend('");var r=window.location,t=e('div[property="dc:title"] h1',s).text(),a=e(".share-sub",s).text(),n="https://twitter.com/intent/tweet?url="+encodeURI(r)+"&text="+t+" "+a,i="http://www.facebook.com/sharer.php?u="+r+"&display=popup",t="https://www.linkedin.com/shareArticle?mini=true&url="+r+"&title="+t+"&summary="+a,a="mailto:?subject="+document.title+"&body="+encodeURI(document.location);e(".share-fb",s).attr({href:i}),e(".share-twitter",s).attr({href:n}),e(".share-linkedin",s).attr({href:t}),e(".share-forward",s).attr({href:a}),e(".share-print",s).attr({onclick:"window.print();return false;"})}(jQuery)}}}]); +!function(t){var a={};function n(e){if(a[e])return a[e].exports;var r=a[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=a,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(r,e){if(1&e&&(r=n(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var a in r)n.d(t,a,function(e){return r[e]}.bind(null,a));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=0)}([function(e,r,t){"use strict";t.r(r);t(1)},function(e,r,t){window.Drupal.behaviors.stanford_news={attach:function(s,e){!function(e){e(".news-social-media",s).prepend('"),e(".news-social-media",s).prepend('"),e(".news-social-media",s).prepend('"),e(".news-social-media",s).prepend('"),e(".news-social-media",s).prepend('");var r=window.location,t=e('div[property="dc:title"] h1',s).text(),a=e(".share-sub",s).text(),n="https://twitter.com/intent/tweet?url="+encodeURI(r)+"&text="+t+" "+a,i="http://www.facebook.com/sharer.php?u="+r+"&display=popup",t="https://www.linkedin.com/shareArticle?mini=true&url="+r+"&title="+t+"&summary="+a,a="mailto:?subject="+document.title+"&body="+encodeURI(document.location);e(".share-fb",s).attr({href:i}),e(".share-twitter",s).attr({href:n}),e(".share-linkedin",s).attr({href:t}),e(".share-forward",s).attr({href:a}),e(".share-print",s).attr({onclick:"window.print();return false;"})}(jQuery)}}}]); //# sourceMappingURL=news-node.behaviors.js.map \ No newline at end of file diff --git a/lib/js/stanford_news_list.behavior.js b/lib/js/stanford_news_list.behavior.js index 17ff3d23..871cb19d 100644 --- a/lib/js/stanford_news_list.behavior.js +++ b/lib/js/stanford_news_list.behavior.js @@ -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') { diff --git a/templates/components/news-list/news-item-list.twig b/templates/components/news-list/news-item-list.twig index b3dd9b70..ca7cf20b 100644 --- a/templates/components/news-list/news-item-list.twig +++ b/templates/components/news-list/news-item-list.twig @@ -68,7 +68,7 @@ {# Add the image and link only if they both exist. #} {% if news_list_image|render|striptags('')|trim is not empty -%} {%- if news_url is not empty -%} -