PolymerElements / paper-input

A Material Design text field
https://www.webcomponents.org/element/PolymerElements/paper-input
130 stars 162 forks source link

Prevent error messages from being read by screen readers when the input is not in an error state. #692

Closed bicknellr closed 5 years ago

bicknellr commented 5 years ago

Hide the content of paper-input-error elements with invalid === false using visibility: hidden; on an internal wrapper element so that it isn't read by screen readers even if the paper-input-error is referenced by an aria-describedby attribute.

e111077 commented 5 years ago

I just wonder how this will work when people use paper-input-error on their own and styling it (e.g. will we have to inherit certain styles?). I don't think there will be any issues, but we'll see from internal testing.

bicknellr commented 5 years ago

Internal testing ended up clean after a deflake. (Links to the tests are in the CL you've already seen: \<REDACTED>)

bicknellr commented 5 years ago

@e111077 btw that link is still available in the history of the comment. I think if you want to remove it entirely you'll have to delete the comment itself. FWIW, I don't think it's a problem to post go/ links: https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md