Accessibility/EditorBehaviourOnUserInput: Difference between revisions

no edit summary
No edit summary
Line 31: Line 31:
# to use unformalized forms
# to use unformalized forms
# AT users to work with controls as usually
# AT users to work with controls as usually
===Refined statements===
; navigation block:
Editable area is always [[Accessibility/RichContentKeyboardBehaviour#Navigation_blocks|navigation block]].
; keyboard navigation:
If caret is inside an editable area then the editor is focused until the rich element is focused.
; tab navigation:
If the editor is focused then pressing tab should insert '\t' character or its used analogue or move the focus to the next tabable element (outside or inside an editable area) what depends on editor preferences or platform.
; mouse interaction:
The rich element behavior is the same on mouse input if the mouse isn't used to change the selection, i.e. if the user click on rich element and moves the mouse to extend the selection then element is not clicked, i.e. it doesn't get the focus but selected. The special case is in-text elements what aren't focused and click event handlers aren't invoked when the user clicks on.
; mouse selection:
When mouse click is occurred on the rich element while 'add-to-selection' modifier key is pressed (like ctrl key) then the element is appended to the selection entirely, the element is not focused and no element's action is invoked. Note, this is applicable for in-text elements as well.


==Stub approach==
==Stub approach==
All rich elements aren't focusable and included into navigation sequence. When the caret is between empty characters of the rich word or sentence then the rich element is called selected. Visually it might look a blue border around the element.
All rich elements aren't focusable and included into navigation sequence. When the caret is between empty characters of the rich word or sentence then the rich element is called selected. Visually it might look a blue border around the element.


===Refined statements===
=Details=
; navigation block:
==Navigation block==
Editable area is always [[Accessibility/RichContentKeyboardBehaviour#Navigation_blocks|navigation block]].
Editable area is always [[Accessibility/RichContentKeyboardBehaviour#Navigation_blocks|navigation block]].
; keyboard navigation:
 
If caret is inside an editable area then the editor is focused.
==Keyboard navigation==
; tab navigation:
In the case of interactive approach if caret is inside an editable area then the editor is focused until the rich element is focused.
 
In the case of stub approach if caret is inside an editable area then the editor is focused.
 
==Tab navigation==
;interactive approach:
If the editor is focused then pressing tab should insert '\t' character or its used analogue or move the focus to the next tabable element (outside or inside an editable area) what depends on editor preferences or platform.
 
;stub approach:
If the editor is focused then pressing tab should insert '\t' character or its used analogue or move the focus outside an editable area to the next tabable element what depends on editor preferences or platform.
If the editor is focused then pressing tab should insert '\t' character or its used analogue or move the focus outside an editable area to the next tabable element what depends on editor preferences or platform.
; keyboard and mouse interaction:
 
==Keyboard interaction==
 
;interactive approach:
The rich element behavior is the same on mouse input if the mouse isn't used to change the selection, i.e. if the user click on rich element and moves the mouse to extend the selection then element is not clicked, i.e. it doesn't get the focus but selected. The special case is in-text elements what aren't focused and click event handlers aren't invoked when the user clicks on.
 
;stub approach:
The rich element isn't focusable or interactive. If the user clicks on the element then it's selected, i.e. the caret is put between empty characters.
The rich element isn't focusable or interactive. If the user clicks on the element then it's selected, i.e. the caret is put between empty characters.
; mouse selection:
 
==Mouse selection==
When mouse click is occurred on the rich element while 'add-to-selection' modifier key is pressed (like ctrl key) then the element is appended to the selection entirely, the element is not focused and no element's action is invoked. Note, this is applicable for in-text elements as well.
When mouse click is occurred on the rich element while 'add-to-selection' modifier key is pressed (like ctrl key) then the element is appended to the selection entirely, the element is not focused and no element's action is invoked. Note, this is applicable for in-text elements as well.
=Suggestion=
Note: for discussions about navigation, unless specified assume caret navigation mode is off.


==Removing the selection from DOM==
==Removing the selection from DOM==
The selection is removed from DOM by 'Del' or 'Backspace' keys (or their platform's analogies) as usual.
The selection is removed from DOM by 'Del' or 'Backspace' keys (or their platform's analogies) as usual.


If the special content element is selected then it's removed entirely with its boundary characters. If the integral element is focused and 'Del' or 'Backspace' key is pressed and if there is no element's default action then the element is removed. Both 'Del' and 'Backspace' keys have the same meaning in this case.
If the rich element is selected then it's removed entirely with its boundary characters. If the integral element is focused and 'Del' or 'Backspace' key is pressed and if there is no element's default action then the element is removed. Both 'Del' and 'Backspace' keys have the same meaning in this case.


If the selected region contains the part of compound element's content but the element itself then the selected element's content will be removed, the element is saved.
If the selected region contains the part of compound element's content but the element itself then the selected element's content will be removed, the element is saved.


==Drag'n'drop==
==Drag'n'drop==
The selected entirely special content element is dragged from one place to another as an individual element. If the selected element is a part of the selected region then the region is dragged entirely with all selected elements.
The selected entirely rich element is dragged from one place to another as an individual element. If the selected element is a part of the selected region then the region is dragged entirely with all selected elements.


If the special content element is focused then drag'n'drop operation is performed as usual. For example, if textbox is focused and user starts to drag selected text of textbox then the text should be dragged only. As well in the case of focused compound element its selected content participates in drag'n'drop operation, not the element itself.
If the special content element is focused (in the case of interactive approach) then drag'n'drop operation is performed as usual. For example, if textbox is focused and user starts to drag selected text of textbox then the text should be dragged only. As well in the case of focused compound element its selected content participates in drag'n'drop operation, not the element itself.


Drag'n'drop operation can be performed by mouse or by keyboard. However keyboard shortcuts are under discussion still.
Drag'n'drop operation can be performed by mouse or by keyboard. However keyboard shortcuts are under discussion still.


==Clipboard operations==
==Clipboard operations==
If the special content element is selected entirely then it can be copied into clipboard. Both its text representation and the element itself should be copied into clipboard as different mime types.
If the rich element is selected entirely then it can be copied into clipboard. Both its text representation and the element itself should be copied into clipboard as different mime types.


If the special content element is focused then clipboard operation works as usual.
If the rich element is focused (in the case of interactive approach) then clipboard operation works as usual.


If the special content element is pasted from clipboard into editable area then it is pasted as an element.
If the rich element is pasted from clipboard into editable area then it is pasted as an element.


=Implementation notes=
=Implementation notes=
Confirmed users
1,396

edits