-
Notifications
You must be signed in to change notification settings - Fork 902
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
Added accessibility features to mwc-textfield #1852
Added accessibility features to mwc-textfield #1852
Conversation
Test failing on 0693e31 certainly because I used |
Thanks for the PR, and sorry for the delay on commenting! We discussed this at our triage meeting last week, and our consensus is to hold off on implementing #1215 right now for a few reasons that are not immediately obvious:
We really appreciate the contribution, but given these reasons and our need to carefully upcoming work, we'd like to wait before addressing this outstanding bug. |
Thanks a lot for the detailed answer, truly appreciated ! Beyond the specifics of this PR, I think it illustrates a series of concerns I was not sure where/how to state. So, I'll do it here, not without thanking the devs who are putting tremendous amount of quality in the code base.
Would it make sense to post some type of high-level outline of medium term vision / problems encountered / area of work / what to expect in next releases ... It would be interesting to know a bit more about thinking behind theming options, envisioned long-term relationship with MDC foundation... It would also be kind of reassuring. For instance, discussion in #1121 was helpful.
I came to select this library because of the pleasant experience playing with / extending / contributing to other lit-based components (also because of very good experience with using Polymer elements). It wish it could be more of the same here. As a consequence I end up, like in the old times, with a series of fragile override for doing things the library does not yet care of. I will now be closing this PR, as - again - reasons for not incorporating it makes sense, and open a couple follow-up issues (#1873, #1874). |
@@ -387,6 +392,10 @@ export abstract class TextFieldBase extends FormElement { | |||
return html` | |||
<input | |||
aria-labelledby="label" | |||
aria-controls="helper" | |||
aria-describedby="helper" | |||
aria-errormessage="helper" |
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.
@allan-chen - aria-errormessage
and aria-invalid
, ref for #1872
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.
Thanks - I believe someone else is working on aria-invalid
for textfield so I'll leave it out of scope of my PR for now.
CC/ @brandondiamond - for your consideration we should add incorporate MWC into the aria-invalid
enhancements, should be little overhead
As a follow-up of #1215.
The purpose of this PR is to make mwc-textfield more accessible, basically following https://github.com/material-components/material-components-web/tree/master/packages/mdc-textfield/helper-text#accessibility.
b020c1f makes test suite work on my machine. Test engine would not start without.
c3c45c1 is added to make use of chai a11y aXe testing lib (https://open-wc.org/testing/testing-chai-a11y-axe.html). The way it is embedded now is pretty ugly. Open to any better suggestions on how to hook this to the current testing library (I am not a all used to typescript, so bare with me)
main work done under 0693e31. Tell me what needs to change before I commit similar work to textarea.