vmware-archive / clarity

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.
http://clarity.design
MIT License
6.43k stars 762 forks source link

fix(wizard): improve wizard aria-labelledby #6741

Closed mathisscott closed 2 years ago

mathisscott commented 2 years ago

• addresses vpat-762 • also issue #4683 • added unit tests

Signed-off-by: Scott Mathis smathis@vmware.com

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

aria-labelled on the modal-dialog by points to the modal-title (which is the step/current-page title) in the wizard.

Issue Number: #4683

What is the new behavior?

we've added a labelledBy property/input that can be used to change the target id of the aria-labelledby attr on .modal-dialog.

all of this is internal. the new prop/input is only public because the wizard needs to use it in its template where it builds out the modal. both ids (modalId and wizardId) are auto-generated.

because this is all internal it is a good candidate for backporting.

Does this PR introduce a breaking change?

Other information