-
-
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
#1098: Made input labels accessible across the editor UI #8267
Conversation
…shown to avoid unnecessary UI animations.
…ng shown to avoid unnecessary UI animations.
…ew LabeledFieldView API.
@ckeditor/qa-team Can you take a look at this PR? |
@Reinmar There's one architectural aspect of the PR I'd love to know your opinion about. |
I checked it with screen readers on mac an win, on different browsers and different languages. Apart from lack of |
A nice catch! I'm not sure this is in the scope of this PR, though. In this PR we're talking about visual accessibility while this is screen reader accessibility and this problem also occurs on master. Anyway, I checked this in VoiceOver and the screen reader fails to read the label for the input. I'm not sure how to fix it, though, because the field is more complex than this. @Comandeer can you give us some thoughts on this? |
I meant: let's have a follow-up for this 😛 |
The contrast difference between a placeholder and filled values is IMO too low. I wonder if this makes it harder to understand whether a field is filled: This is the limit value for WCAG AA: IDK if reducing the contrast to 4.5 makes sense as the placeholder text in the input is very important (it tells you what that field is about). However, such a form is easier to understand to me. Alternatively, we could make the default text a bit darker and keep the current placeholder color. However, we should then make the icons stop following this variable (they'd otherwise get darker too): |
Not sure if it's supposed to work on http://localhost:8125/ckeditor5-theme-lark/tests/manual/theme.html where it says that it's supposed to be labeled but there's no label: |
As for It's unclear for me from the documentation when this is applicable. My guess is that when we display some form with one of the fields pre-focused, then we don't want to show the transition. Is that correct? If so, then, it'd be lovely to update this documentation with more info. Other than that – And finally – the solution is far from perfect in this sense that it leaks presentational logic to JS. Unfortunately, I suppose there's no other way around this and thus:
I can see it is used in 3 places, so it's not bad. If you want to keep it this way, I'd be fine with that. If you'll decide to keep this solution, I think that classes that mix it (like |
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.
As commented. The RTL issues are blockers. The test issues probably not but since we're not in a hurry and these might be smaller things, it'd be good to fix these too. Finally, as for the whole disabling transitions problem – we may KISS. The naming would need to be fixed and the interface thing.
There's another option, BTW, to move these methods to an object inside a view. Like:
And then use:
The idea here would be to not have two additional methods and a property on a view, but have them grouped. |
Addressed in 34d3a80 and ec85982.
Addressed in 34d3a80. Regarding the dark theme, I created a follow-up a few weeks ago #8275.
It's pretty clear to me what's the purpose of this helper. It has nothing to do with inputs (although I use it for this purpose). It could be any transition on any DOM element.
IMO the only sane way to maybe improve this is to narrow the use-case to the inputs and their focus (instead of entire forms in my implementation) because currently, this is the only use case. The implementation of
I'd rather not make it available across all views in the editor when there are only a few use-cases. I like the decorator pattern. |
It looks like it was broken before. Fixed in 243b0f5. |
…w label and the label of a field with a value.
Increased contrast in 9fad801.
Can we discuss it in a follow-up? I think the change that I mentioned ☝️ makes it good enough and we can think about it later. Decoupling icon color and text color would be a serious breaking change because the whole UI/theme depends on this coupling. |
Suggested merge commit message (convention)
Feature: Made input labels accessible across the editor UI. Closes #1098. Closes #8242.
BREAKING CHANGE (theme-lark): The look and behavior of the
LabeledFieldView
UI component (used for displaying fields across the project) has changed. This may require changes in your integration if it customizes the.ck-labeled-field-view
selector (or its internals).Additional information
Some notes for QA:
Before/after