Accessibility/RichContentKeyboardBehaviour: Difference between revisions

m
Line 138: Line 138:
== Rich element as a lexical unit ==
== Rich element as a lexical unit ==


A {{term|rich element}} should be treated differently than rich text when the user navigates through a navigable area. The primary idea is to put the caret immediately before or after the rich element. This makes it possible to select only the rich element as it is not immediately surrounded by the rich text. This requirement has special meaning for editable areas where the user should be able to write text before or after the rich element.
A {{term|rich element}} should be treated differently than rich text when the user navigates through a navigable area. The primary difference is it should be allowed to put the caret immediately before or after the rich element. This makes it possible to select only the rich element as it is not immediately surrounded by the rich text. This requirement has special meaning for editable areas where the user should be able to write text before or after the rich element.
 
[davidb: I'm not sure my edits capture your intended meaning here ^]


To make this happen special autogenerated {{term||empty character||empty characters}} are inserted before and after the rich element. If the rich elements are placed one after another then each of them has empty character embedded between them, i.e. the elements don't share empty characters. For instance, if there are two rich elements next to each other then there will be (empty)(rich)(empty)(empty)(rich)(empty).
To make this happen special autogenerated {{term||empty character||empty characters}} are inserted before and after the rich element. If the rich elements are placed one after another then each of them has empty character embedded between them, i.e. the elements don't share empty characters. For instance, if there are two rich elements next to each other then there will be (empty)(rich)(empty)(empty)(rich)(empty).
Line 148: Line 146:
=== Integral element is a word ===
=== Integral element is a word ===


The {{term||integral element}} should be treated as a word. The term ''rich word'' will be used to emphasize the word is a rich element.
The {{term||integral element}} should be treated as a {{term|word}}. The term ''rich word'' will be used to emphasize the word is a rich element.


If the element doesn't contain any navigable text then its word doesn't have any characters and is referred to as an ''empty word'', otherwise its word consists of all contained characters and it's referred to as a ''complex word''.
If the element doesn't contain any navigable text then its word doesn't have any characters and is referred to as an ''empty word'', otherwise its word consists of all contained characters and it's referred to as a ''complex word''.
Line 161: Line 159:
<pre>text&lt;button&gt;btn&lt;/button&gt;&lt;input value="value"&gt;text
<pre>text&lt;button&gt;btn&lt;/button&gt;&lt;input value="value"&gt;text
</pre>  
</pre>  
conditional notation can be presented as "text<span style="color: blue;">||</span><span style="color: red;">|</span>value<span style="color: red;">|</span>text", where the empty character is marked by '|' symbol. Both the empty word for the button and the complex word for the input are wrapped by empty characters ('|' symbols of blue and red colors correspondingly).
conditional notation can be presented as "text<span style="color: blue;">||</span><span style="color: red;">!</span>value<span style="color: red;">!</span>text", where the empty characters are marked by the '|' and '!' symbols. Both the empty word for the button and the complex word for the input are wrapped by empty characters (blue '<span style="color: blue;">|</span>' for the first case and red '<span style="color: red;">!</span>' in the second case).
</div>
</div>
[Cragun: can we use something different that | blue and | red, which are not accessible?  Could we state: "conditional notation can be presented as "text<span style="color: blue;">||</span><span style="color: red;">!</span>value<span style="color: red;">!</span>text", where the empty character is marked by the '|' and '!' symbols.  Both the empty word for the button and the complex word for the input are wrapped by empty characters (blue '|' for the first case and red '!' in second case. )  ]


===In-text element as a sentence===
===In-text element as a sentence===
Since an in-text element behaves as a part of the rich text then it should be treated as a sentence that consists of all the words of the contained text. At the same time it should be possible to set the caret before/after the element. To meet this requirement the empty characters are appended before the first word and after the last word of the sentence to designate the sentence boundaries like what happens for rich words. The term ''rich sentence'' will be used to designate it is for the in-text element.
Since an {{term|in-text element}} behaves as a part of the rich text then it should be treated as a {{term|sentence}} that consists of all the words of the contained text. At the same time it should be possible to set the caret before/after the element. To meet this requirement the empty characters are appended before the first word and after the last word of the sentence to designate the sentence boundaries like what happens for rich words. The term ''rich sentence'' will be used to designate it is for the in-text element.


<div style="margin: 1em 0px; border: 2px dotted orange; padding: 1em;">
<div style="margin: 1em 0px; border: 2px dotted orange; padding: 1em;">
Line 182: Line 178:


===Static element as a character===
===Static element as a character===
The static element is treated as a single character when the user navigates through the web page.
The {{term|static element}} is treated as a single {{term|character}} when the user navigates through the web page.


===The caret position and selection terms===
===The caret position and selection terms===
Line 217: Line 213:


===Mapping to AT===
===Mapping to AT===
The rich element accessible as a part of text container accessible is an embed character. All characters of the reach word or sentence including its empty characters are contained in embed character. The empty character should be exposed to AT as a certain character. This character should be not pronounceable character so that AT might not need any additional special support.
The rich element accessible as a part of text container accessible is an embed character. All characters of the reach word or sentence including its empty characters are contained in embed character. The empty character should be exposed to AT as a certain character so that AT can get correct text offsets and announce them while the user navigates through web page. For example, let's have 'text<button>btn</button>text' then screen reader can read like 't', 'e', 'x', 't', 'before button', 't', 'e', 'x', 't'.


[cragun: do you mean it should should be unpronouncable so the AT cannot read it? or do you mean it should be pronounceable so it can be read without special support?]
The same time it should be an unpronouncable character so that the text containing empty characters can be read without special support.


== Keyboard interaction with the rich element ==
== Keyboard interaction with the rich element ==
Confirmed users
1,396

edits