-
Notifications
You must be signed in to change notification settings - Fork 115
Conversation
@jeremykenedy Thanks for contributing this PR! It would be helpful to have a little more context for these changes. Currently, the button has an But if this change was fueled by actual usability issues you encountered while using accessibility technologies, we definitely want to hear about it! |
I introduced the title tag due to when only using the icon for toggle there is no indicator as to what it does other than the icon, with the title tag it will give you the "hide" and "show" verbiage on hover. Also, the JS will toggle the title text when clicked. |
@@ -112,6 112,7 @@ | |||
attr: { | |||
role: 'button', | |||
'aria-label': 'Show Password', | |||
'title': 'Show Password', |
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.
Unquote 'title'
(legal prop name does not require quotes).
@jeremykenedy Thanks for responding to my question! I had to really think this over. Initially I was skeptical because an icon-only treatment is an implementation choice on the part of the developer, and the code already allows the implementor to pass along custom attributes for each state (though the syntax for doing so is pretty verbose). That said, the alternative text for this is simply "Show" and "Hide" within the element itself, which may not be enough to clue user's in to what is actually going on. So as of this morning I'm coming around to this being a nice default to implement. I've pointed out a few small formatting nits inline. If you wouldn't mind making those adjustments, I'd be happy to merge this in and give it a version bump. |
Hello, thanks for letting me contribute :) I have made the changes. Cheers! |
Thanks, @jeremykenedy! Your changes are in version |
Added title tag to toggle attr, show, and hidden states.