-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Splitter: missing/incorrect accessibility features #5849
Comments
These are good suggestions! |
I also suggest the addition of aria-valuetext in addition to the (required) aria-valuenow. Many screen readers will read simply announce the number value from the aria-valuenow property (e.g., aria-valuenow="30". It could sounds better with screen readers if developers could optionally add a string like aria-valuetext="30%" in addition to the respective aria-valuenow="30". The percentage sign in the aria-valuetext sounds better in context with the view that is being resized. |
Would Aria valuetext be read instead of value-now? I know different screen readers do different things. |
Yes, Per my tests, JAWS 2023 and NVDA 2023.2 in Chrome will read the aria-valuetext value over the aria-valuenow. VoiceOver MacOS (v13) and ChromeVox (ChromeOS 119+) will also read aria-valuetext over aria-valuenow when present. Definitively retain aria-valuenow (per ARIA 1.2 spec) but the added description via aria-valuetext adds a little charm and context to the text-to-speech experience IMO. FYI I also observed that JAWS defaults to reading min=0 and max=100 when the respective aria properties (aria-valuemin and aria-valuemax) are missing. In many of the react splitter examples I notice that some of the panels have min and max sizes that are not the extreme values of 0 and 100. Adding this observation/vote for Shawn's request above. |
OK let me take a look and submit a PR. I will let you know when its ready for review! |
PR submitted: #5852 I am pretty sure I got everything on your list. |
10.4.0 is out if you guys want to test out all my changes? |
Describe the bug
I refer to the detailed specs outlined here: https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/
the incorrect one is the use of aria-orientation which while the component prop refers to the orientation of the panels themselves, the aria-orientation should be the orientation of the separator, i.e., always the inverse of the component orientation.
the missing are:
role="separator" on the separator
aria-valuemin and aria-valuemax on the separator
aria-controls on the separator with a value that points to the primary panel
props should be added to the component to allow setting of aria-label and/or aria-labeledby on the separator
and then ideally add to the keyboard handling support for the Home, End and Enter keys
Reproducer
https://primereact.org/splitter/
PrimeReact version
10.3.3
React version
17.x
Language
ALL
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
The behavior is reproducible in any example of the Splitter component, including the samples in Prime React documentation at https://primereact.org/splitter/
Expected behavior
that the separator includes the following attributes in the rendered HTML:
The component should have two 2 props, aria-label and aria-labelledby (note that the spec spelling uses labelled and not labeled), the values of these should be passed through to identically named attributes on the separator
Implement additional keyboard functionality:
The text was updated successfully, but these errors were encountered: