Skip to content

Commit

Permalink
UHF-8530: Remove role="article" from teasers
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkkimaagi committed Sep 14, 2023
1 parent c6c0869 commit 32a0361
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion templates/content/node--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
'rel': 'bookmark',
} %}

<div{{ attributes.addClass(classes) }}>
{# Role is removed from below to avoid populating UI with role="article" elements for accessibility #}
<div{{ attributes.removeAttribute('role').addClass(classes) }}>

<div class="content-card__image">
{% if image.0 %}
Expand Down
3 changes: 2 additions & 1 deletion templates/module/helfi-news-item/news-teaser-generic.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
%}
{% endif %}

<div{{ attributes.addClass('news-listing__content', default_classes, class) }}">
{# Role is removed from below to avoid populating UI with role="article" elements for accessibility #}
<div{{ attributes.removeAttribute('role').addClass('news-listing__content', default_classes, class) }}">
{# Short title or Title #}
<{{ heading_level }} class="news-listing__title">
{% set link_attributes = {
Expand Down

0 comments on commit 32a0361

Please sign in to comment.