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

fix: incorrect aria role in image slider #3640

Draft
wants to merge 6 commits into
base: stable
Choose a base branch
from
Draft
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
8 changes: 3 additions & 5 deletions resources/views/Widgets/Common/ImageCarouselWidget.twig
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@

<div class="widget widget-image-carousel widget-{{ appearance | default('primary') }} widget-proportional{% if aspectRatio != 'auto' and fullHeight != true %} widget-prop-{{ aspectRatio }}{% endif %}{% if customClass | length > 0 %} {{ customClass }}{% endif %}{% if margin | length > 0 %} {{ margin }}{% endif %}{% if stylingClasses | length > 0 %} {{ stylingClasses }}{% endif %}{% if fullHeight %} vh-100{% endif %}{% if fullWidth %} widget-fw{% endif %}"{% if inlineMargin | length > 0 %} style="{{ inlineMargin }}"{% endif %}>
<div id="image-carousel_{{ carouselId }}" class="widget-inner carousel slide{% if animationStyle == 'fade' %} carousel-fade{% endif %}" data-ride="carousel">
<div class="carousel-inner" role="listbox" aria-label="{{ trans("Ceres::Template.itemImageCarousel") }}">
<div class="carousel-inner" aria-roledescription="carousel" aria-label="{{ trans("Ceres::Template.itemImageCarousel") }}">
{{ Twig.for("slide", "slides") }}

<div class="carousel-item{{ Twig.if("loop.first") }} active{{ Twig.endif() }}">
<div role="tabpanel" aria-roledescription="slide" class="carousel-item{{ Twig.if("loop.first") }} active{{ Twig.endif() }}">
<a {{ Twig.if("slide.url is not empty") }}href="{{ Twig.print("slide.url") }}"{{ Twig.endif() }}
{{ Twig.if("slide.openInNewTab is not empty") }} target="_blank" {{ Twig.endif() }}>
{{ Twig.if("slide.imageUrl is not empty") }}
Expand Down Expand Up @@ -165,8 +165,7 @@
image-url="{{ Twig.print("slide.imageUrl") }}"
fallback-url="{{ Twig.print("slide.fallbackImageUrl") }}"
alt="{{ Twig.print("altText") }}"
title="{{ Twig.print("imgTitle") }}"
role="option">
title="{{ Twig.print("imgTitle") }}">
</lazy-img>
<noscript v-if="false">
<img src="{{ Twig.print("fallbackUrl") }}"
Expand All @@ -182,7 +181,6 @@
src="{{ Twig.print("fallbackUrl") }}"
alt="{{ Twig.print("altText") }}"
title="{{ Twig.print("imgTitle") }}"
role="option"
/>
</picture>
{% endif %}
Expand Down