-
Notifications
You must be signed in to change notification settings - Fork 39
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
Xander/carousel accessibility compliance #1416
Changes from all commits
2e362ee
d8ca41f
426a98f
b470b59
4a5875c
0f3b67e
6805c2f
faf0cd5
eb22965
2f5127d
2c0c7e1
89cafd6
cb583f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,14 +49,14 @@ export const CarouselSlide = React.forwardRef((props, ref) => { | |
|
||
return ( | ||
<Box | ||
as='li' | ||
as='div' | ||
className={cx('iui-carousel-slider-item', className)} | ||
role='tabpanel' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i believe you need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding that role causes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's interesting, because APG suggests using i believe it might be because we are using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
role='group' | ||
aria-roledescription='slide' | ||
ref={refs} | ||
{...rest} | ||
> | ||
{children} | ||
</Box> | ||
); | ||
}) as PolymorphicForwardRefComponent<'li', CarouselSlideProps>; | ||
}) as PolymorphicForwardRefComponent<'div', CarouselSlideProps>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this id changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a typo in the example that caused it to throw an error. It was supposed to be
--slide-
, which is the format used in theCarouselDotsList
component.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm i think this behavior is actually wrong.
CarouselDotsList
is the component, whereasCarousel.onlyDots
is the example; the latter should not rely on implementation details of the former.i wonder if we even need
id
andaria-controls
. since we removedrole=tabpanel
in #1416 (comment), i thinkrole=tab
can also be removed fromCarouselDot
. i will double check tomorrow.you can also try to read through APG on your own and compare our markup with theirs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed
role=tab
fromCarouselDot
myself, and it generated these violations. I think we have to keep this role, unless something else can be changed that would allow us to remove it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so i've been looking into this and need more time. I think fixing Carousel accessibility would require some bigger changes across the whole component, so you could move this PR to draft and work on a different PR in the meantime.
i will pick up Carousel later