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 role="slider", aria-valuemax and aria-valuemin needed? #191

Closed
kirsty-hames opened this issue Aug 8, 2023 · 2 comments · Fixed by #195
Closed

Is role="slider", aria-valuemax and aria-valuemin needed? #191

kirsty-hames opened this issue Aug 8, 2023 · 2 comments · Fixed by #195

Comments

@kirsty-hames
Copy link
Contributor

Subject of the issue

Mozilla ARIA slider role best practice states HTML's <input type="range"> implicitly has the role of slider. Do not use aria-valuemax or aria-valuemin attributes on <input type="range"> elements; use min and max instead. Otherwise, any global aria-* attributes and any other aria-* attributes applicable to the slider role.

Slider already uses min and max properties but maybe we should remove role="slider", aria-valuemax and aria-valuemin as suggested?

@kirsty-hames
Copy link
Contributor Author

I can confirm removing role="slider", aria-valuemax, aria-valuemin and aria-valuenow has no impact and works as expected for voiceOver. Testing on both Mac and iPhone Safari. I'd need someone to confirm other screen readers/environments.

@oliverfoster
Copy link
Member

oliverfoster commented Oct 26, 2023

I think I only added them because we were having issues with rangeslider and I wanted to make it explicit as to how the slider becomes accessible.

578ad47

They are implied properties of the <input type="range"> element, so it should be fine to remove.

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