Skip to main content

BIN CcPZ9 Documentation

  • Author:

  • Version: 13

  • Description: Access key example, from bindexamples app

  • Created: 2014-09-11

  • Modified: 2016-03-14

  • Source:

     Edit Bin W3C Schema Json-Schema Java Bean Code Default Value as XML

    Printers Embed Responsive

    <complexType name="LabelExplicitAccessKey" description='Access key example, from bindexamples app'
    			extra:cc.title.html='
    				This form shows how an access key can be assigned to a field
    				using its label usage. 
    				&lt;p&gt;Accesskey are a disputed accessibility tecnique see
    				for example this article *and discussion*
    					&lt;a href="http://juicystudio.com/article/firefox2-accesskeys.php"&gt;http://juicystudio.com/article/firefox2-accesskeys.php &lt;/a&gt;
    				&lt;ul style="text-align:left">
    				&lt;p>&lt;b>Labels &lt;/b>&lt;p>			    
    				&lt;li>Using the access key on a &lt;em>required simple&lt;/em> field causes 
    			        the correspondent input control to be focused.
    			        For example use [F] to focus on the [First Name] text input.
    			    &lt;li>Using the access key on a &lt;em>optional simple&lt;/em> field
    			    	&lt;em>that currently has no value&lt;/em> causes 
    			        the correspondent input control to be displayed and focused, 
    			        using the access key on an optional field &lt;em>that currently has a value&lt;/em> 
    			        has the same behavior of a required field: causes the input to be focused.
    			        For example use [D] of [Date Of Birth] to create and focus on the date input.
    			   &lt;li>Using the access key on a &lt;em>complex&lt;/em> field causes 
    					the input of the first of its fields to be focused.
    					For example use [A] of [Address] to focus on  the [Full Street Address]
    					input. Is still possible to use the access key of the first field of the complex
    					type bbut here is not defined, it is defined instead for [Friend].
    				&lt;li>When a field is optional and hidden like [Friend] and [Date Of Birth] in this example,
    					is possible to use the access key in order to create a value and show a control 
    					for typing data in. 
    					Once an optional field has its control displayed, 
    					the focus act in the same way of a not optional field,
    					so in the example, the [Friend] label focuses on the [First Name] input control
    					and [Date Of Birth] on its input control.
    				
    
    			   &lt;li>On some browsers is possible to iterate through fields that have the same 
    			   	access key pressing it  multiple times. In this example using [F] we can iterate
    			   	through the [First Name] fields, when [Friend] has a value.
    
    				
    				&lt;/ul>
    			 '>
    			<implements type='PersonWithAccessKeys'/>
    			<field name='FirstName' extra:form.key='F' />
    			<field name='LastName' extra:form.key='L' />
    			<field name='OptionalDateOfBirth' minOccurs='0' type='xs:date'  extra:form.key='D' extra:form.alt='Date of birth of the person.' />
    			<field name='Address' caption='Address' type='Address'
    				extra:form.alt='An address.'  extra:form.key='A' />
    			<field name='Friend' type='PersonWithAccessKeys'  minOccurs='0'
    				extra:form.alt='An optional friend.'  extra:form.key='i'/>
    
    
    		</complexType>
    		<complexType name="PersonWithAccessKeys" description='an helper type for access keys example'>
    			<implements type='Person'/>
    			<field name='FirstName' extra:form.key='s' />
    			<field name='LastName' extra:form.key='L' />
    			
    		</complexType>
    
    <complexType name='Person'>
    			<field name='FirstName' caption='First Name' type='xs:string'
    			    extra:form.alt='The first name of the person.' 
    			    extra:form.empty='false' >
    			    <facet name='minLength' value='2'/>
    			</field>    
    			<field name='LastName' caption='Last Name' type='xs:string'
    			    extra:form.alt='The last name of the person.' 
    			    extra:form.empty='false' >
    			    <facet name='minLength' value='2'/>
    			</field>    
    		</complexType>
    
    <complexType name='Address'>
    			<field name='Street' caption='Full Street Address' type='xs:string'
    			    extra:form.alt='Full street address, with street number.' >
    			    <facet name='minLength' value='2'/>
    			</field>    
    			<field name='City' caption='City' type='xs:string'
    			    extra:form.alt='City of address.' 
    			    >
    			    <facet name='minLength' value='2'/>
    			</field>    
    			<field name='ZipCode' minOccurs='0' extra:form.key='Z'  type='xs:string'
    			    extra:form.alt='An optional ZIP Code.'>
    			    <facet name='minLength' value='3'/>
    			</field>    
    			
    			
    		</complexType>