Problem/Motivation

The carousel template contains markup and attributes that do not follow Bootstrap 5’s carousel structure:

- Navigation and indicators can be rendered when there is only one slide.
- `data-wrap` is used instead of `data-bs-wrap`.
- The configured keyboard option is not rendered.
- Controls use Bootstrap 4-style links instead of buttons.
- Indicator numbers are derived from result keys instead of slide numbers, producing incorrect labels in multi-column carousels.
- The active indicator lacks `aria-current="true"`.
- Drupal wrapper attributes are not rendered.
- The carousel preprocess adds unrelated media-object classes.

Steps to reproduce

1. Create a View using the Bootstrap carousel format.
2. Enable navigation and indicators.
3. Configure multiple columns per slide.
4. Configure the keyboard or wrap options.
5. Inspect the resulting markup.
6. Repeat with no more results than fit on one slide.

Proposed resolution

Calculate the slide count during preprocessing using the result count and configured column count. Pass the slide count and keyboard option to Twig, and update the template to follow Bootstrap 5’s documented markup.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

shelane created an issue. See original summary.

  • shelane committed 6ae6beb9 on 5.5.x
    fix: #3628019 Carousel template does not follow Bootstrap 5 markup and...
shelane’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • shelane committed 4449df22 on 5.5.x
    fix: #3628019 Carousel template class for mobile breakpoint