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(password): add screen-reader only text for password hide/show button #6648

Closed hippee-lee closed 2 years ago

hippee-lee commented 2 years ago

Signed-off-by: Matt Hippely mhippely@vmware.com

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce? This is an update to the Angular form password control. It adds screen reader only text to the password hide/show button. In addition it also adds the text to the common strings service so that consumers can override or customize as needed.

What is the current behavior?

Screen readers cannot read the password hide/show button title.

Issue Number: N/A

What is the new behavior?

Screen readers can read the .clr-sr-only text inside the password hide/show button.

Does this PR introduce a breaking change?

Other information