-
-
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
Should readonly editor be focusable? #6200
Comments
Generally speaking, I’m OK with the solution (
|
As @Comandeer noted on Slack discussion, |
It means the editable will be included in the tab navigation even if read-only. We've never done this before (ATM we're compliant with v4 in that matter). Is this the right a11y pattern @Comandeer? Are there some recommendations telling us this is the right thing to do? For the record: I'm not saying no. Just making sure this is the right approach. |
As a read-only element, it should be marked up with
If the editor itself is correctly marked (as e.g. |
From end-user point of view even readonly field should still be focusable. It's even a nice UX addition if you can still manipulate selection inside (so you can just tab into it, do a |
For me, it's 👍 conceptually. But I'm sensing some issues, so we'd need some time for it. |
It looks like inline annotations cannot be displayed if the editor is in read-only mode. It may be connected with above - AFAIR, the contextual balloon is not shown if the editor is not focused. Additionally this is also a problem for non-classic builds because you lose the access to the toolbar at all. So, for example, you cannot use export to PDF etc. |
Problem here is inconsistency, as it only affects inline UI - narrow/wide side bar are displayed |
📝 Provide a description of the improvement
I recently stumbled upon one thing connected to editable focus in CKE5.
So, when the editor is in read only mode, it receives
contenteditable=false
which makes it not-focusable by the browser, as it doesn't havetabindex
set. This messes up with some features that use editor'sFocusTracker
to operate (I mean focusing annotations for comments and track changes, in readonly mode).This is not a critical issue for now, but I'd like us to think whether the editor should be or should not be focusable when it is in readonly mode. For me readonly and focusing are different properties. I mean, why should editor be not focusable if it is readonly? For example, for default browser fields,
readonly=true
fields are still focusable.The easy fix around that is adding
tabindex="-1"
to the editable element when it is in readonly mode. This will not mess up tabbing (tabbing will behave the same as it did in both readonly and normal mode). But it will enable clicking into markers to highlight annotations. However, this is the easy fix solution. Maybe there's more to that issue.@oleq prepared a fiddle you can play with: https://jsfiddle.net/oleq/j6vdsx0q/5/
The text was updated successfully, but these errors were encountered: