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

bugfix/role-update Remove unnecessary role from Slides.jsx #113

Closed
wants to merge 1 commit into from
Closed

Conversation

bluSCALE4
Copy link

Fix for #112

@mrbinky3000
Copy link
Collaborator

Thanks! I was actually making a PR to do this and a few other things. You beat me to it!

@mrbinky3000
Copy link
Collaborator

mrbinky3000 commented Nov 19, 2018

Wait... removing role="listbox" breaks aria rules requiring that interactive elements have a role. Our carousel responds to keyboard events, so it requires a role.

https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md

This might be fine for bootstrap, but we need a role. It might be better to add the aria-option tag to the Slide component? Not sure about that. Further research is needed.

Copy link
Collaborator

@mrbinky3000 mrbinky3000 left a comment

Choose a reason for hiding this comment

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

Removing this breaks the following Aria rule:
https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md

This element catches keyboard events so people can use the keyboard to the previous or next slide.

@bluSCALE4
Copy link
Author

As mentioned on the bootstrap thread, listbox/option is more akin to a select box so informing a screen reader that this widget is a select box does more harm than good. Unfortunately, role="widget" isn't valid here so my thought is could we just squelch the error entirely? The example also referenced in the Bootstrap thread, https://www.w3.org/WAI/tutorials/carousels/working-example/, doesn't assign any roles in the element with listeners.

@mrbinky3000
Copy link
Collaborator

Thanks for the added info.

I'm still discussing this update with our accessibility consultants. It's a busy time for online retail right now ;-) 🎄 🎁. I will definitely get to this as soon as possible.

@stale
Copy link

stale bot commented Dec 17, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 17, 2018
@mrbinky3000
Copy link
Collaborator

Re-opening. Still working on this.

@stale stale bot removed the wontfix label Dec 19, 2018
@stale
Copy link

stale bot commented Jan 9, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 9, 2019
@tim-steele
Copy link
Contributor

@bluSCALE4 we have read a lot of information, and talked to some internal accessibility resources.

There does not seem to be a "best" option for Carousel behavior using Aria. People have made an argument that you should use listbox, and that is what is being used in other accessibility components. People have made an argument that tablist is a better option. Others have made the argument that you can use marquee. There are reasons for and against each.

What is important is the use of the aria role attribute. This lets screen readers know that it is an interactive element. So we do want to keep the attribute. We would be open to discussing whether there is a better role other than listbox, but we definitely don't want to remove the aria role completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants