-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Inaccessible input for link's URL #1098
Comments
I check this out and simply adding |
Well, it fixes issue for users of screen readers, but all other concerns (described in linked articles) are still there. |
If you mean concerns about discoverability (placeholder disappears when the user is typing), we discussed that during the design phase and dismissed it because there's no way this form could surprise anyone; it's either:
Besides, even FB uses placeholders for their sign up form ;-) Anyway, we decided to take some risks to gain a more compact and modern-looking UI. And mostly we were aware of them. Still if we
then, I think, we're on the safe side, despite other potential concerns. |
And that's a part of why FB is not considered super accessible :P
In such case placeholder could be mistaken with filled field (I have issues with distinguishing between them). But yes, making |
I'll create a simple PR for this issue. |
The same situation (incorrect label) is present also for other inputs in the editor, e.g. media embed one. |
Some more context: https://codepen.io/stevef/post/placeholder-the-piss-take-label#show-us-the-fail-they-ask-1 This indicates that label should be visible the whole time. |
@oleq yes, that's exactly what's on my mind. |
I created a PoC with the "material approach". The only drawback (so far) I see now is that we're gonna need more padding around forms so balloons like link or text alternative will be bigger. The code: |
@oleq looks nice to me. Any reason why you dropped a thicker outline upon focus? Now it looks inconsistent with buttons next to it, buttons in the toolbar etc. |
@mlewand Doesn't look good with the notch IMO But maybe it needs some polishing. |
I had to compare your proposal with what we have right now, to realise that what we currently see is: So, there will be one more change β the placeholder (usually β an URL) will be replaced with a label. Which makes the description in media embed dialog unnecessary: Which causes a problem with the fact that now it can be seamlessly replaced with this tip: BTW, I think that the code that you pushed (the two branches) don't work: I guess more changes are needed than just in the UI and theme packages. |
The code is incomplete. You have to increase the padding of the balloons manually. And I didn't even consider the media balloon; it's a PoC after all. |
Regarding issues that you were discussing here:
|
It's a bummer then π The height of the input is in sync with the height of toolbar buttons. Increasing the height of the input will bloat toolbars. It's a weird and complex thing because it's a part of the UI scalability using variables system etc.. |
Agree. And perhaps we can count on some feedback if we link to this from the milestone ticket. Because we tried to gather some feedback, but there wasn't any so far. |
@oleq Could you refresh the constellation of branches? I tried to merge master to those branches but there are some conflicts. |
It's done. Check out https://github.com/ckeditor/ckeditor5/tree/t/ckeditor5/1098-poc for the latest version. |
I revived the PoC in #7952 (migrated to monorepo, migrated table forms) and I think it's time to think it over, hence this RFC. π Here you can check out the latest PoC with the new features live π Context and Problem StatementAs @Comandeer pointed out in his original issue, inputs displayed in the UI of the editor (e.g. link URL, etc.) are inaccessible. There are 2 problems with the current approach:
Back in 2019, I came up with a proposal that implements material designβlike inputs in CKEditor 5 to address both problems. The PoC was forgotten π because there were different priorities back then but now I decided to revisit it and see how it performs with new forms like table properties or table cell properties. Decision Drivers
Considered OptionsDo "next to nothing"
Display labels next to fields.We could enable the labels before fields (they are already in DOM, it's just a matter of removing Note: It does not change the look of table forms as the labels are already there under the fields (or before them when there is enough space). Adopt the material UI approachThe idea is to adopt the Material approach to text fields but in a slightly more compact way because space our UI can use is very limited. In this approach, labels are always visible but there is little to no sacrifice in terms of space or layout. Pros and Cons of the OptionsDo "next to nothing"Pros
Cons
Display labels next to fields.Pros
Cons
Adopt the material UI approachPros
Cons
|
I really like the material UI approach with a few comments:
|
For me, I sad it once, I say it again: I really like the idea of introducing this material ui concept. I also like the way you implemented it πππ I'm all for it as it is IMHO the best of all the solutions. We also already invested quite some time, so it makes sense to convert this into a tangible value in CKE5. I also recall that we explicitly asked for community feedback back in iteration 29. We did not get any objections to the proposal, so we can see that there are objections out there. Few minor details:
I think it make sense to extract such details as a followup not to stop this big change. |
A ready PR with screenshots landed in #8267. |
Feature: Made input labels accessible across the editor UI. Closes #1098. Closes #8242. MAJOR BREAKING CHANGE (theme-lark): The look and behavior of the `LabeledFieldView` UI component (used for displaying fields across the project) have changed. This may require changes in your integration if it customizes the `.ck-labeled-field-view` selector (or its internals).
Is this a bug report or feature request? (choose one)
π Bug report
π» Version of CKEditor
Version from docs.
π Steps to reproduce
β Expected result
Shown
input
has proper label that is announced by screen reader.β Actual result
Only
[placeholder]
value is announced by VoiceOver, which is confusing as placeholder is set to a URL.Chrome devtools Accessibility Inspector shows that current label is empty:
π Other details that might be useful
The issue is caused by the fact that
label
for the input is hidden withdisplay: none
. It should be hidden with more accessible technique, e.g. one proposed by H5BP.In the ideal situation, link dialog would display both
label
and hint outside theinput
itself:If the hint is present, then it should be bound to the
input
with[aria-describedby]
attribute.Some context:
The text was updated successfully, but these errors were encountered: