Community
Participate
Working Groups
In order to be accessible for keyboard-only users, the user needs to be able to traverse out of the editor. Almost all other web controls can be traversed using Tab and Shift+Tab. However the editor consumes Tab keys for the purpose of: - entering Tab characters into the text (or equivalent spaces) - indenting, if the selection includes a line break when Tab is typed - outdenting, if Shift+Tab is typed We need to determine what the "correct" keystrokes should be, and then we need to implement them. See "Bug 362347 - Shift+Tab in editor changing focus instead of unindent" for more background info.
Say, this sounds interesting. From the ARIA Authoring Practices doc: Optionally, if the developer wishes to provide the ability to insert a tab into the document, it is recommended one of the following methods be used. - Provide indent and outdent buttons in the menu. Keyboard shortcuts to the buttons should be Ctrl+M for indent and Ctrl+Shift+M for outdent. - Provide a button in the menu to toggle the use of Tab between the two modes. If this button is used, then Ctrl+M is recommended as a keyboard shortcut to toggle the button. http://www.w3.org/TR/wai-aria-practices/#richtext
*** Bug 368850 has been marked as a duplicate of this bug. ***
We use [F6] in Firefox and Chatzilla for this kind of thing.
I've implemented the method to allow Ctrl+M switch between the usage of tabs. I've put this in the following commit in the bug363714 branch. https://github.com/max-li/orion.client/commit/84b7f10ae03894993430e1813ada0bccdf886645
I've modified the above patch to fix an inconsistency. Silenio, could you please review? The commit is in the bug363714newer branch. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=bug363714newer
Max, we need some changes to make it consistent with the current API: 1) Remove isConsumingTabs() and make tabMode an option that can be set/get with getOptions()/setOptions(). 2) rename changeTabMode to toggleTabMode 3) Why do you need this change? return typeof(a.defaultHandler()) === "boolean"; It seems wrong. Shouldn't it be: return a.defaultHandler();
One more: For consistency, maybe textView.js should add the shiftTab action and consume the key depending on the tabMode.
(In reply to comment #6) > 3) Why do you need this change? > > return typeof(a.defaultHandler()) === "boolean"; > > It seems wrong. Shouldn't it be: > > return a.defaultHandler(); Correct me if I'm wrong, but I think it needs to be like that so that if the defaultHandler returns false, _doAction() still returns true as it did before (note that when _tabMode is false, _doTab (and equivalent) doesn't return a boolean) I've made the other changes and put them into the bug363714new branch. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=bug363714new&id=9bd5785f865bbfa02fb34fa6450b82b0d3c2627a
(In reply to comment #8) > Correct me if I'm wrong, but I think it needs to be like that so that if the > defaultHandler returns false, _doAction() still returns true as it did before > (note that when _tabMode is false, _doTab (and equivalent) doesn't return a > boolean) Ok. > > I've made the other changes and put them into the bug363714new branch. > http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=bug363714new&id=9bd5785f865bbfa02fb34fa6450b82b0d3c2627a The shiftTab action cannot consume Shift+Tab all the time, it has to check tabMode. Other then that the patch is fine to be merged into master.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=673769e4f4fbde11da6ce96fb294a3aeb158b3a0