-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Insert link: validation and feedback #1838
Comments
I've just tested this and I was able to enter a link like: So apparently there's no validation at all. Also, no visible or audible feedback. Seems to me this should be addressed before releasing... /Cc @mtias |
See also #1867 it would be nice to have it in the release, together with some form of validation. |
This is a regression from the current editor. |
Closing as implemented in #11286. Let's open any pending improvements, ideas, and enhancements elsewhere. |
@talldan - did you open a follow-up for the missing red dots around invalid link? It's a minor thing but I remember it was discussed in the PR where this feature was ported from the Classic editor. |
If I were to try to improve this design, where should that go? I see a number of issues/PRs around this topic. |
Hi @melchoyce #11796 is the one you're after. Thanks! |
Thanks Dan! |
* update ref * Update ref * update ref * update ref * update ref * update ref to master (adjust vertical margins) * update ref Co-authored-by: Luke Walczak <[email protected]>
Splitting this out from the first accessibility testers group report, but not strictly related to a11y:
In the current WordPress editor, there's some simple, basic check on the inserted URL format. If the check detects a potential malformed URL, there's a visual feedback. Also when the link is not selected, it is highlighted with some "warning" styling:
There's also an assertive aria-live message as audible feedback, see:
speak( editor.translate( 'Warning: the link has been inserted but may have errors. Please test it.' ), 'assertive' );
Instead, in Gutenberg the link field uses the
required
attribute and thus relies on client-side validation which is inconsistent across browsers, and doesn't give a proper feedback. This is what happens in Chrome (note: at the time of writing, the insert link doesn't work at all in Firefox):In this case Chrome doesn't say anything useful. I'd say the visual feedback is not so useful for all users, not just assistive technologies users.
It would be great to implement some validation/feedback mechanism to have feature parity with the current editor.
Also, a a proper placeholder used to give a hint about the expected format could help. Something like:
http://example.org
. However this depends on future plans for the insert link functionality: will a search be implemented?The text was updated successfully, but these errors were encountered: