Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDSS-846: A11y | Updates to News Vertical Card component #220

Merged
merged 5 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
margin-right: 0;
}

.su-news-header {
display: flex;
flex-direction: column;
}

.su-news-vertical-teaser__link,
.su-link {
@include sdss-link--primary;
Expand Down Expand Up @@ -64,6 +69,8 @@
.news-vertical-teaser__pub-date {
@include responsive-spacing('padding-bottom', 0);
@include responsive-spacing('padding-top', 0);

order: -1;
}

.news-vertical-teaser__source {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<article{{ attributes.addClass(classes) }}>
{%- if news_url is not empty -%}
<a {{ news_url_attributes.addClass('su-news-vertical-teaser__link') }} href="{{ news_url }}">
<a {{ news_url_attributes.addClass('su-news-vertical-teaser__link') }} href="{{ news_url }}" tab-index="-1" aria-hidden="true">
{%- endif -%}
<figure class="su-media su-media--image su-card__media">
<div class="su-media__wrapper">
Expand All @@ -50,7 +50,6 @@
{%- if news_url is not empty -%}
</a>
{%- endif -%}
<div class="news-vertical-teaser__pub-date">{{ news_list_publishing_date }}</div>
<div class="su-news-header">
{%- if news_url is not empty -%}
<a {{ news_url_attributes.addClass('su-news-vertical-teaser__link') }} href="{{ news_url }}">
Expand All @@ -61,6 +60,7 @@
{%- if news_url is not empty -%}
</a>
{%- endif -%}
<div class="news-vertical-teaser__pub-date">{{ news_list_publishing_date }}</div>

<div class="news-vertical-teaser__source">
{% if news_source|render|striptags('<drupal-render-placeholder>')|trim is not empty %}
Expand All @@ -75,4 +75,4 @@
{%- if news_footer is not empty -%}
<div class="news-vertical-teaser__footer">{{ news_footer }}</div>
{%- endif -%}
</article>
</article>
Loading