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

Carousel missing roles, names and attributes #44

Open
CrystalZenyth opened this issue Feb 8, 2024 · 0 comments
Open

Carousel missing roles, names and attributes #44

CrystalZenyth opened this issue Feb 8, 2024 · 0 comments

Comments

@CrystalZenyth
Copy link

CrystalZenyth commented Feb 8, 2024

For a carousel with a single slide:

To ensure accessibility of the carousel, follow these steps:

  1. Place the slider within a container element with the role="region" and the attribute aria-roledescription="carousel". Include either an aria-labelledby attribute that references the ID of the heading element labeling the carousel, or use an aria-label attribute to provide a descriptive label for the carousel.
  2. Wrap each individual slide within a list item element with the attribute role="group" and aria-roledescription="slide" to indicate the role of each slide.
  3. Additionally, set the aria-label attribute to display the slide number in the format "# of #", indicating the current slide number and the total number of slides.
  4. Structure the slider dots inside of the region list markup and add aria-controls to each button referencing and ID on the slide they control.

For a carousel with a multiple slides:

To ensure accessibility of the carousel, follow these steps:

  1. Wrap the slider within an element that has the attribute aria-roledescription="carousel". Additionally, include either an aria-labelledby attribute that references the ID of the heading element used to label the carousel or an aria-label attribute that provides a descriptive label for the carousel.
  2. Within the carousel element, include a child element with the attribute role="list" to indicate the list structure of the carousel.
  3. Wrap each individual slide within an list item element and make sure they have the necessary attributes. Set the aria-label attribute to display the slide number in the format "# of #", indicating the current slide number and the total number of slides. Additionally, use the attribute aria-roledescription="slide" to describe the role of each slide.
  4. Structure the slider dots inside of the region list markup and add aria-controls to each button referencing and ID on the slide they control.

To discuss further: [email protected] - Crystal Scott, CPWA

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

No branches or pull requests

1 participant