Skip to content

Bug: Carousel tabs using aria selected are invalid without a role set #182

@SARCASMOOO

Description

@SARCASMOOO

Summary

The carousel tabs are enclosed in a role tablist, which they should have.
The issue is that because the tab items themselves do not have a role tab, the use of aria-selected is considered invalid.

Please note the carousel items also require a role=tabpanel since the div element does not have a role by default.
And we shouldn't have aria-selected on the carousel item itself. Since aria-selected is valid for only certain roles, and the roles are not valid for a carousel item.

Steps to reproduce

With a carousel example on a page, run an Axe DevTools full page scan.
You will notice the following message.

"Elements must only use supported ARIA attributes"

Expected Behaviour

When doing an Axe Dev tool scan, ensure there are no invalid aria-selected items.

Screenshots

Image

Additional Notes

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-selected

Note the following from the ARIA Reference.

The aria-selected attribute indicates the current "selected" state for gridcell, option, row and tab roles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions