-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix(material/stepper): updates vertical-stepper aria roles #30577
base: main
Are you sure you want to change the base?
fix(material/stepper): updates vertical-stepper aria roles #30577
Conversation
Deployed dev-app for a28e833 to: https://ng-dev-previews-comp--pr-angular-components-30577-dev-8fa6kebf.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
85afb00
to
8a56517
Compare
5c61ea5
to
21533e8
Compare
6097d6b
to
71e25bf
Compare
71e25bf
to
54bab8e
Compare
9820986
to
334d4de
Compare
/** Only find steps with the given selected state. */ | ||
selected?: boolean; | ||
/** Only find steps with the given expanded state. */ | ||
expanded?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can leave the selected
terminology. expanded
doesn't really apply to horizontal stepper since they don't expand/collapse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So unfortunately, it looks like the aria-selected attribute can't be applied to aria role="button"
. I'm thinking of changing it to aria-pressed instead as it's an accepted attribute for buttons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we should keep the selected
terminology in the test harness. The harness doesn't need to match the ARIA pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @crisbeto, I've reverted my harness changes to use isSelected
terminology instead but be based off of aria-pressed
. Let me know if these new changes are sufficient. Thanks for your consult on this!
439ec62
to
e43bcd2
Compare
57b1b9e
to
1de20e4
Compare
Updates Angular Component's vertical stepper to use more generic aria roles since having the default tablist/tab/tabpanel applied to the vertical stepper violates WCAG rules of having tabpanel as a nested child within tablist. The new roles of group and region satisfy aria requirements while maintaining the current html structure of the vertical stepper. Fixes b/361783174
Updates previous fix to create individual mat-step-header tags to be used within the horizontal and vertical steppers to make it easier to edit/understand.
Updates previous fix to add aria-expanded attribute to vertical stepper to be more descriptive as to when the associated content is open and the respective step is current.
Updates stepper.spec.ts to check for region role for the vertical stepper based on the new role updates.
Work on fixing failing tests.
Updates stepper.spec.ts to match updated aria-roles for vertical stepper so that it is looking for the appropriate roles/attributes.
Reverts previously changed step-harness files.
Remove unnecessary aria-pressed from vertical stepper.
Updates stepper-harness tests to make checks depending on whether the stepper is horizontal or vertical and checking the attributes accordingly.
Ran command to update api golden checks with new stepper tests.
Updates previous fix to use an ng-template instead of using mat-step-header twice.
…ttern as vertical Updates previous fix so that the aria-roles are cohesive between horizontal/vertical to simplify the patterns.
Updates previous documentation so it uses the correct/updated aria roles of , , and with the attribute.
…les & attributes Updates all tests that are affected by the updated stepper aria roles and attributes.
Ran command to update API goldens.
…pper Updates previous changes to only use aria-expanded for vertical stepper and to add aria-pressed and aria-current values depending on the selectedIndex value.
…utes Updates stepper tests based on the new aria-attributes that were added to the stepper, particularly for the horizontal stepper.
Ran command to update api goldens.
Updates previous changes to tests which used isPressed and isExpanded to simplify to isSelected instead.
188a79b
to
a28e833
Compare
Updates Angular Component's vertical stepper to use more generic aria roles since having the default tablist/tab/tabpanel applied to the vertical stepper violates WCAG rules of having tabpanel as a nested child within tablist. The new roles of group and region satisfy aria requirements while maintaining the current html structure of the vertical stepper.
Fixes b/361783174