Skip to content

Conversation

@sarah-cul
Copy link
Contributor

@sarah-cul sarah-cul commented Sep 17, 2025

Description

github issue #3529 Controls on the carousel slides need accessibility improvements.

Carousels that did not chose to use the captions will have aria-labels on the buttons: 'Previous item', 'Next item'

Carousels that are using a primary, or secondary caption, or both will have the aria-label on the buttons, but they will also have aria-describedby values so that visitors using screen readers will know what item to expect

Testing

- a test was added to an existing rspec

  • manual testing -> I used Voice Over to hear/see the aria-describedby text whentabbing to the next and previous buttons on the carousel. I tried multiple carousels on the page, and the case where 2 carousels have the same item. (Please see ticket for screenshots)

@sarah-cul sarah-cul assigned sarah-cul and unassigned sarah-cul Sep 17, 2025
@sarah-cul sarah-cul force-pushed the 3529-carousel-aria-labels branch from 2fe039b to f5685e5 Compare September 23, 2025 13:48
Copy link
Contributor

@corylown corylown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addresses the issue.

I don't love adding even more logic into the template. I think if we were implementing this feature now we'd probably use a component instead. But what you have is not out of line with how things are currently implemented. I am wondering if all of the logic could be handled in the javascript instead where it would at least be in one spot? What do you think?

@sarah-cul
Copy link
Contributor Author

yes, I can work on that

@sarah-cul sarah-cul force-pushed the 3529-carousel-aria-labels branch from 338637e to f58d37a Compare September 23, 2025 18:32
@sarah-cul sarah-cul force-pushed the 3529-carousel-aria-labels branch from f58d37a to 0914ab2 Compare September 24, 2025 13:29
@sarah-cul sarah-cul requested a review from corylown September 24, 2025 13:43
@corylown corylown merged commit fd18949 into main Sep 24, 2025
6 checks passed
@corylown corylown deleted the 3529-carousel-aria-labels branch September 24, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants