-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Accessibility | Step component bugs and improvements #13742
Comments
Hi @GiacomoDM, thanks for report issues and for help and contributing with your PRs. Accessibility in web development is a "complicated world" and sometimes you don't have the necessary things to test them with elements that a person with a disability uses, so all the help or PRs you can provide here I suppose they would appreciate it. |
Hi @GiacomoDM, Thanks a lot for your investigation and PRs. Don't hesitate to open issues or PRs about accessibility, since we're currently implementing it, there would be some points that we've missed. A helping hand is always appreciated. We appreciate the effort you put in! |
Hi @SoyDiego and @cetincakiroglu.
Yes, they declared the work on accessibility for the Step component done with version 16.1.0 (#13264). We start accessibility tests as soon as we can, on the components that are declared completed accessibility-wise in each release. We plan to open bugs with PRs for each problem found. If you want me to describe the issues differently/provide som kind of further proof let me know. |
Thanks for all your support, help and information. |
Hi @GiacomoDM, Could you please resolve conflicts in your PR's so we can merge them |
…3742 # Conflicts: # src/app/components/steps/steps.ts
Fix #13742 Step component accessibility improvements
…ccessibility improvements
Hi, So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap? Thanks a lot for your understanding! |
Describe the bug
The Step component has some accessibility problems:
li
element and one for thea
inside, adding links information such asvisited
and so on. The correct behaviour is the same one as theTabView
component, so the aria tags and role should be switched between thea
(roletab
and all the aria tags) and theli
(rolepresentation
and no aria tags).TabView
component, so when tabbing in the Stepper the focus should go to the active step (the only one withtabindex=0
), a consequent tab should leave the Stepper and go to the next focusable element on the page. Shift-tabbing back to the stepper should return focus to the active step.aria-disabled
as they should.aria-current='step'
, that makes the screen reader read them as they were interactable. The aria tag should be present only when not disabled or readonly.Also, since the Stepper has role
tablist
and each step roletab
, they should also havearia-controls
with the id of the controlled element, that in turn should havearia-labelledby
. This is more complicated to handle, since the current implementation of the Step component doesn't have a concept of step content.This could be solved by adding a new optional property to the MenuItem:
overrideAriaControls
or something like that, that delegates to the user the responsibility to correctly link the MenuItem to the actual id of the controlled element. While this would be simple to handle on the Step level, it would be more complicated for all the other components that use a MenuItem, as they should be updated to use this property when present instead of the automatically set one (eg: seeTabView
that already correctly implementsaria-controls
etc.)I will open two different PRs, one for all the 5 points above and one to showcase the implementation of the
aria-controls
property in theMenuItems
for the Step component only. If accepted, it should be ported to all other components too.Environment
Windows
Reproducer
https://primeng.org/steps/
Angular version
16.X
PrimeNG version
16.3.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.13
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: