-
-
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
Pressing the tab key in restricted editing mode enters a table thats non editable #16070
Pressing the tab key in restricted editing mode enters a table thats non editable #16070
Conversation
…d-editing-mode-enters-a-table-thats-non-editable
packages/ckeditor5-restricted-editing/src/restrictededitingmodeediting.ts
Outdated
Show resolved
Hide resolved
@@ -287,6 +287,7 @@ export function toWidgetEditable( | |||
writer.addClass( [ 'ck-editor__editable', 'ck-editor__nested-editable' ], editable ); | |||
|
|||
writer.setAttribute( 'role', 'textbox', editable ); | |||
writer.setAttribute( 'tabindex', '-1', editable ); |
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.
How would it behave if the whole editor has other tabindex
set by integrators? For instance tablindex=-2
. Was it tested (in manual test or otherwise)?
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.
In that case, it would behave the same
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.
From MDN:
A negative value (the exact negative value doesn't actually matter, usually tabindex="-1") means that the element is not reachable via sequential keyboard navigation.
Note: tabindex="-1" may be useful for elements that should not be navigated to directly using the Tab key, but need to have keyboard focus set to them. Examples include an off-screen modal window that should be focused when it comes into view, or a form submission error message that should be immediately focused when an errant form is submitted.
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
Suggested merge commit message (convention)
Fix (widget): Pressing tab should not focus widget editable. Closes #15506.
Additional information
For example – encountered issues, assumptions you had to make, other affected tickets, etc.