P. 1
21761 Leitner-PK Edits and ALT Text 6Oct11

21761 Leitner-PK Edits and ALT Text 6Oct11

|Views: 3|Likes:
Published by James Mwai

More info:

Published by: James Mwai on Jan 19, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/31/2014

pdf

text

original

1 | Copyright © 2011, Oracle and/or it’s affiliates. All rights reserved.

|

Insert Information Protection Policy Classification from Slide 8

Mobile Accessibility with LWUIT
Peter Korn, Accessibility Principal, Oracle Ofir Leitner, Software Developer, Oracle
2 | Copyright © 2011, Oracle and/or it’s affiliates. All rights reserved. |

Insert Information Protection Policy Classification from Slide 8

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

3 | Copyright © 2011, Oracle and/or it’s affiliates. All rights reserved. |

Insert Information Protection Policy Classification from Slide 8

Oracle and/or it’s affiliates. | Insert Information Protection Policy Classification from Slide 8 . All rights reserved.Program Agenda • • • • • • Background on accessibility: laws & regulations Accessible mobile devices in the market Background on LWUIT Architecture & code examples Demos Thanks and Q&A 4 | Copyright © 2011.

and understandable by people with a wide range of abilities.” 5 | Copyright © 2011. Oracle and/or it’s affiliates. | Insert Information Protection Policy Classification from Slide 8 . All rights reserved. operable.Accessibility Basics Definition “Accessibility is about making user interfaces perceivable.

All rights reserved.Accessibility Basics What it means • Making products work for… – – – – – – – Users with visual impairments Users with hearing impairments Users with motor impairments Users with cognitive impairments People with temporary disabilities Situational limitations The aging population 6 | Copyright © 2011. | Insert Information Protection Policy Classification from Slide 8 . Oracle and/or it’s affiliates.

All rights reserved. | Insert Information Protection Policy Classification from Slide 8 . Access or Adaptive Technology: devices for people with disabilities that enable people to perform tasks that they were formerly unable to accomplish.Accessibility Basics . 7 | Copyright © 2011. by providing enhancements to or changed methods of interacting with the technology needed to accomplish such tasks. Oracle and/or it’s affiliates.AT Assistive. or had great difficulty accomplishing.

gov’t procurement of “Electronic and Information Technology” • EU Mandate 376 – “Section 508 for all of Europe” – Applies to EU “Information and Communication Technology” procurement • Department of Justice & Americans with Disabilities Act – Applying ADA to situations like eBook readers used in schools • 21st Century Communications & Video Accessibility Act – “Advanced Communications” & web browsing mobile phones • UN Convention on the Rights of Persons with Disabilities 8 | Copyright © 2011.S. Oracle and/or it’s affiliates. | Insert Information Protection Policy Classification from Slide 8 .Mobile Accessibility Laws and Regulations • Section 508 of the Federal Rehabilitation Act – U. All rights reserved.

| Insert Information Protection Policy Classification from Slide 8 . All rights reserved. some with built-in AT – BlackBerry with 3rd party AT – Android & iPhone with included screen readers.. – Few options for accessible Java apps – Accessible phones are the most expensive Smart Phones 9 | Copyright © 2011.Accessible Mobile Phones Java ME in a marketplace of accessible phones • First accessible phones: brittle reverse-engineering by AT – Symbian.. Oracle and/or it’s affiliates. Windows Mobile with expensive 3rd party AT • Newer phones: accessibility APIs. iPhone Zoom – Growing 3rd party AT offerings for Android & iPhone • BUT.

| Insert Information Protection Policy Classification from Slide 8 . Oracle and/or it’s affiliates. All rights reserved.LWUIT INTRO 10 | Copyright © 2011.

Oracle and/or it’s affiliates. All rights reserved. TV. SE..What is LWUIT? Lightweight User Interface Toolkit • Advanced. Android.. | Insert Information Protection Policy Classification from Slide 8 . free for commercial use – Active community 11 | Copyright © 2011. Blackberry.. lightweight UI library • Compelling UI – Consistent across different devices • For today's handsets (and more . CDC. • Inspired by Swing • Tools support • Open Source! – GPLv2 + Classpath Exception.) • Portable – MIDP.. .

LWUIT: Key Benefits Easy Development and Deployment • Rapid development – Familiar API – Clean & simple • Easy deployment – One jar. | Insert Information Protection Policy Classification from Slide 8 . Oracle and/or it’s affiliates. All rights reserved. extensible • “Filthy Rich” UI • Brand-able • Designed for mass market devices – Tested on broad range of hardware 12 | Copyright © 2011. many devices • Consistent & flexible – Customizable.

theming I18N/L10N support Insert Information Protection Policy Classification from Slide 8 13 | Copyright © 2011. All rights reserved. Oracle and/or it’s affiliates.LWUIT: Key Features Rich Functionality • • • • • • • • • • Swing-like MVC Layouts Fonts Rich widgets HTML widget 3D & SVG integration Touch screen support Animations & transitions Pluggable Look & Feel. | .

ACCESSIBILITY: THE BASICS 14 | Copyright © 2011. All rights reserved. | Insert Information Protection Policy Classification from Slide 8 . Oracle and/or it’s affiliates.

Accessibility Requirements for LWUIT What needs to be there to support users with disabilities • Needs to be operable from the keyboard (by someone who can’t use a touchscreen) – LWUIT already has full phone keyboard operability • Needs to support a variety of themes for folks with poor vision – e. All rights reserved. Oracle and/or it’s affiliates.g. “high contrast”. “large print” – LWUIT already themeable • Needs to support an accessibility API for interoperability with assistive technologies – The subject of the remainder of this presentation 15 | Copyright © 2011. | Insert Information Protection Policy Classification from Slide 8 .

text caret. attributes. selection. 16 | Copyright © 2011. boundary of all text on the display Relationships of UI components with each other. boundary. state(s). checking buttons. etc. name & desc. Min/max/current value of anything that takes a value (e.Accessibility API requirements Industry consensus on a “sufficient accessibility API” • Expose detailed information about UI components – – – – Role. | Insert Information Protection Policy Classification from Slide 8 . including tabular • Fire events when things happen to UI components – Focus. All rights reserved.g. slider) Text contents. Oracle and/or it’s affiliates. selecting items in list. other UI component changes • Allow programmatic modification of UI components – Text insertion.

associating labels with text fields) • Support native AT. | Insert Information Protection Policy Classification from Slide 8 . support Java AT 17 | Copyright © 2011. name of icons. All rights reserved.g.Goals and Constraints • Minimal impact on phones that aren't running AT • Minimal impact on LWUIT API (only add something if we really need to) • Run with existing LWUIT apps • Minimal runtime impact for accessibility metadata (e. Oracle and/or it’s affiliates.

if grandparent of a component is a Tabs class then it is either a TAB or a TABPANEL (according to class and UIID) – Added roles: • LWUITCOMPONENT (Generic custom component) • CONTAINER.g. if the component is a Dialog. Oracle and/or it’s affiliates. | Insert Information Protection Policy Classification from Slide 8 . then it overrides everything else • instanceof checks: e.g.Roles • LWUIT base components mapped to ARIA roles: – Roles are determined by: • If a “role” client property is assigned. if component is TextArea: its role is TEXTBOX • UIID checks: e. All rights reserved. then if its UIID is “Menu” its role is MENU (otherwise its role is DIALOG) • Hierarchy checks: e.g. LABEL 18 | Copyright © 2011.

aria-setsize. These will override everything. aria-level – for tree – Some attributes will be empty by default. since no base component supports them (aria-owns) 19 | Copyright © 2011. – Attributes are determined by base component states. All rights reserved. For example: • aria-disabled – by isEnabled() • aria-visible – by isVisible() • aria-checked – by isSelected() • aria-expanded.Attributes or States • LWUIT base components get some attributes inherently – The user can specify attributes in the component's client properties. | Insert Information Protection Policy Classification from Slide 8 . Oracle and/or it’s affiliates. aria-posinset.

ARCHITECTURE 20 | Copyright © 2011. | Insert Information Protection Policy Classification from Slide 8 . All rights reserved. Oracle and/or it’s affiliates.

Architecture • The Event Bus listens on 2 TCP/IP ports. All rights reserved. and forward relevant App events to the AT AppHandler listens to App events. Oracle and/or it’s affiliates. | Insert Information Protection Policy Classification from Slide 8 . and forwards relevant AT queries to the App All 3 runtimes share a common package that is used to serialize event objects over the network (And also includes some constants such as roles and attributes) – While current implementation is done with TCP/IP. we plan to use also OJWC's Pipe protocol. 21 | Copyright © 2011. one for ATs and one for applications – – – – The Bus opens an AppHandler/ATHandler instance for each app/AT ATHandler listens to AT queries.

and notifies all listeners for that event • The AT can query components states. all via simple methods which are translated to objects that are serialized and sent to the Bus 22 | Copyright © 2011. and on the other hand communicates with the Bus via TCP/IP (Or IMC in the future) • The AT can signal (via the ATBroker) to which events it would like to listen • The ATBroker receives App events.Architecture • ATBroker provides for AT developers event listeners and query methods. children. Oracle and/or it’s affiliates. All rights reserved. | Insert Information Protection Policy Classification from Slide 8 . bounds etc.

All rights reserved.) and sends them as events to the Bus • Events are then sent to the Bus as serialized AEvent objects (The Bus then decides to which AT it should be forwarded.Architecture • The broker once started with Broker. according to what the ATs specified) • The broker also does the job of assigning LWUIT base components with roles and attributes. • In addition it polls other changes to the UI for which we do not have events (Such as hierarchy events. • Once a new Form comes up. | Insert Information Protection Policy Classification from Slide 8 . caret events etc. the developer doesn't use it (Perhaps aside of constants) 23 | Copyright © 2011.init(). and aside from calling init(). it adds itself (and helper objects) as listeners to all components in the UI. starts polling the application UI. • The Broker works in a transparent way to the LWUIT App developer. Oracle and/or it’s affiliates.

Packages • accessibility. and their names • accessibility.app – Used by the LWUIT App.bus – contains the bus classes (Bus. AppHandler) • accessibility.at – Used by AT developers (Contains ATBroker. listeners) • accessibility. contains mainly the Broker 24 | Copyright © 2011. ComponentQuery (queries component states/children etc.). Basically serializes the event type and a queryId.common – a common package used by all 3 runtimes (AT/App/Bus) for a unified way of serializing event objects. AEvent can also be a query or response (Considering elaborating the class structure) – Other events: RegisterEvent (App/AT identification). Oracle and/or it’s affiliates. FocusEvent. ATHandler. Includes: – AEvent – the base event class. | Insert Information Protection Policy Classification from Slide 8 . StatesResponses (Returns component queries) – Role – constants representing the ARIA roles and their names – Attribute – constants representing the ARIA att. All rights reserved.

25 | Copyright © 2011. | Insert Information Protection Policy Classification from Slide 8 .Code Samples: Enabling Accessibility • Making a LWUIT app accessible is very easy. it would be done by LWUIT.init(“App Name”). Oracle and/or it’s affiliates. simply add to your midlet: Broker. All rights reserved. • Notes: – This should be added after the Display. There would be no need to explicitly initialize the broker. – Your app should use the ATBroker project – This applies to the prototype only.init(midlet) call. when the accessibility technology will be integrated into OJWC.

– Property changes are scanned by the Broker via polling. • However. Oracle and/or it’s affiliates. • Notes: – Only properties listed in the Attribute class are relevant. 6). All rights reserved. 26 | Copyright © 2011.ARIA_SETSIZE). some custom components may require setting various properties • Example: Let's say that we have a custom component that needs to relay the information that it has 6 items: – putClientProperty(Attribute.Code Samples: Custom Properties • Most ARIA properties are determined automatically by the Broker. | Insert Information Protection Policy Classification from Slide 8 .getAttName(Attribute.

Oracle and/or it’s affiliates. container.setLabelForComponent(nameLabel). All rights reserved. 27 | Copyright © 2011. | Insert Information Protection Policy Classification from Slide 8 . container.Code Samples: Setting components names • Another way of adding accessibility info is by using: component. – It is especially useful for components that don’t have a defined name (For example TextArea/Field vs.addComponent(nameField).setLabelForComponent(Label componentLabel) – This was created in LWUIT for other uses. TextField nameField = new TextField().addComponent(nameLabel). Label/Button) • Example: Label nameLabel = new Label(“Name:”). nameField.

int index.setText(person. } 28 | Copyright © 2011. Oracle and/or it’s affiliates. Description – Ensure correct Selection. Object value.getEmail()). boolean isSelected) { Contact person = (Contact) value. pic. email.Code Samples: ListCellRenderers • Work is needed for custom list cells – Set the appropriate Role for the cell – Set the appropriate Name. name. | Insert Information Protection Policy Classification from Slide 8 .setText(person. item count • Example from ScrollDemo.getName()).getPic()). return this.java: public Component getListCellRendererComponent(List list.setIcon(person. All rights reserved.

ATT_NAMES[Attribute.getEmail()). putClientProperty(Attribute. putClientProperty(Attribute. Integer.setText(person. pic. int index. return this.setIcon(person. person.length)). } 29 | Copyright © 2011.ATT_NAMES[Attribute. Object value. Integer.ARIA_SETSIZE]. } putClientProperty(Attribute.getEmail()).ATT_NAMES[Attribute. email.getName() + " " + person.ROLE]. All rights reserved.getPic()).Code Samples: ListCellRenderers continued public Component getListCellRendererComponent(List list.ATT_NAMES[Attribute.toString(index)).setText(person.ARIA_POSINSET].ATT_NAMES[Attribute. | Insert Information Protection Policy Classification from Slide 8 . Oracle and/or it’s affiliates.toString(5*CONTACTS_INFO.getName()).ALT].TRUE). boolean isSelected) { Contact person = (Contact) value. putClientProperty(Attribute. if (isSelected) { putClientProperty(Attribute. name.LISTITEM)). new Integer(Role. Boolean.ARIA_SELECTED].

All rights reserved."AT Name"). ADataChangeListener. implement AFocusListener that gets called on its focusGained method. – Your app should use the ATBroker project 30 | Copyright © 2011. initialize the ATBroker: – ATBroker. Oracle and/or it’s affiliates. • Notes: – This should be added after the Display. register on events: – ATBroker. ACaretListener. • Implement the relevant Listener – For focus for example. APropertyChangeListener • Then.init(midlet.init(midlet) call.getInstance(). | Insert Information Protection Policy Classification from Slide 8 .Code Samples: Assistive Technology • Writing an assistive technology is also quite easy.getInstance(). • First.addFocusListener(this). – Other listeners: • AHierarchyListener.

midlet.common. } public void focusGained(FocusEvent event) { System.MIDletStateChangeException.init(this.getInstance(). Oracle and/or it’s affiliates. public class SimpleATMIDlet extends MIDlet implements AFocusListener { protected void startApp() throws MIDletStateChangeException { ATBroker. | Insert Information Protection Policy Classification from Slide 8 .at. All rights reserved.FocusEvent.MIDlet.addFocusListener(this). import javax. import accessibility.getName() + " (Role: " + event.microedition.getRole()).getInstance().midlet. ATBroker. "Simple AT").println("Gained focus on " + event. import javax. } protected void pauseApp() { } } } protected void destroyApp(boolean unconditional) throws MIDletStateChangeException { 31 | Copyright © 2011.Code Samples: Assistive Technology import accessibility.microedition.ATBroker. import accessibility.AFocusListener.at.out.

All rights reserved. | Insert Information Protection Policy Classification from Slide 8 . Oracle and/or it’s affiliates.Monkey Application Scans all UI components and provides details about them • Demonstrates the ability for AT to query entire UI hierarchy • Also a great accessibility debugging tool 32 | Copyright © 2011.

Demos 33 | Copyright © 2011. | Insert Information Protection Policy Classification from Slide 8 . All rights reserved. Oracle and/or it’s affiliates.

Thanks to our Partners • LWUIT accessibility work is supported by the European Commission as part of the ÆGIS project – EC Grant: FP7 ICT-224348 – Project website: http://www. | .slideshare. Hellas Foundation Vodafone Spain University Polytechnic Madrid Czech Technical University Insert Information Protection Policy Classification from Slide 8 34 | Copyright © 2011. Oracle and/or it’s affiliates.eu – Public presentations: http://www.aegis-project. All rights reserved.net/aegisproject • Thanks to ÆGIS partners who contributed to this work – – – – – Research In Motion Center for Research & Technology.

| Insert Information Protection Policy Classification from Slide 8 .35 | Copyright © 2011. All rights reserved. Oracle and/or it’s affiliates.

| Insert Information Protection Policy Classification from Slide 8 . Oracle and/or it’s affiliates.Q&A 36 | Copyright © 2011. All rights reserved.

All rights reserved. Oracle and/or it’s affiliates. | Insert Information Protection Policy Classification from Slide 8 .37 | Copyright © 2011.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->