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

Is it possible to use another html tag for slider role? #147

Closed
spiletski opened this issue May 27, 2024 · 2 comments
Closed

Is it possible to use another html tag for slider role? #147

spiletski opened this issue May 27, 2024 · 2 comments
Labels
question Further information is requested

Comments

@spiletski
Copy link

Hello,
Using the library in storybook an accessibility issue is appeared.
On accessibility tab:
https://dequeuniversity.com/rules/axe/4.8/aria-allowed-role?application=axeAPI

image image

The issue is related to using and role='slider'. Is it possible to replace the button with div for example?

Thanks in advance!

@nerdyman
Copy link
Owner

nerdyman commented May 28, 2024

Thanks for raising this @spiletski. This might be a red herring, I'm fairly sure the slider role is allowed on button elements. It passed the accessibility checks when the feature was implemented a year or so ago at least.

There's a recent release in the axe-core library (which Storybook uses) to correct this https://github.com/dequelabs/axe-core/releases/tag/v4.9.1 dequelabs/axe-core#4398

The a11y tools in Lighthouse are also flagging this however and I'm not sure of the crossover between axe-core and Lighthouse or other tools. I'll leave this open until I find out.

FWIW slider is announced correctly to screen readers so this issue isn't maybe as critical as it looks.

@nerdyman nerdyman added the question Further information is requested label May 28, 2024
@nerdyman
Copy link
Owner

Lighthouse also uses axe-core so this issue should resolve when the dependencies are upgraded.

Feel free to reopen it if it's still an issue after upgrading.

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

No branches or pull requests

2 participants