-
Notifications
You must be signed in to change notification settings - Fork 90
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
fix(NcRichContenteditable): add aria-placeholder #4407
Conversation
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Not an expert in terms of BITV compliance of the solution, else looks good to me. |
Makes sense though I suspect @michaelnissenbaum may not find this acceptable for similar reasons as on MDN |
Will likely have to go with one of the alternative solutions depending on his feedback |
Can't we just put the text below the input field as suggested my Michael? |
I don't recommend using placeholders, whether in HTML ( |
Yep, we have enough room in the comments interface, there can be a subline in color-text-maxcontrast. |
I'll make another PR with a new feature to add an always visible description for But making the placeholder visible by default as a description will break existing behavior and may not be suitable for any case. I think, in some cases, component users will want to keep using the placeholder as it currently is. What do you think about merging this first to make the current placeholder accessible and then adding an additional description field? |
Isn't there a Edit: Never mind its still a draft 😞 |
Can someone add an image showing how the solution will look like? @susnux |
@jancborchardt this is resulting with a hint implemented on all I don't think the comments instructions on how to use the input field are even needed, but regardless of that, let's treat the comments interface as a the only instance of this problem and solve it there? These |
☑️ Resolves
The solution in this PR is different from the suggestion in the linked issue.
Using
aria-describedby
requires a layout update, adding a wrapper element forNcRichContenteditable
with thediv[contenteditable]
itself and a new visually hidden describing element. Though the layout of the element is not a part of its public interface, I think developers expect the component to be a directlycontenteditable
element and I prefer to keep current simple layout as long as it's possible.A good and very simple alternative solution IMO is
aria-placeholder
.🖼️ Screenshots
🚧 Tasks
aria-placeholder
🏁 Checklist