User Assistance and Feedback

Dialog [inline:dialog_box.png]
TooltipDialog [inline:tooltipDialog.png]
ProgressBar [inline:progress_bar.png]
TitlePane
Click arrow to expand/contract
[inline:title_pane.png]
Tooltip [inline:tooltip.png]

ProgressBar

A ProgressBar gives dynamic feedback on the progress of a long-running operation. The progress can be updated by JavaScript function calls. This method works best for long-running JavaScript operations, or a series of JavaScript XHR calls to the server.

Examples

This progress meter is updated using JavaScript

/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */ .geshifilter {font-family: monospace;} .geshifilter .imp {font-weight: bold; color: red;} .geshifilter .kw1 {color: #b1b100;} .geshifilter .kw2 {color: #000000; font-weight: bold;} .geshifilter .kw3 {color: #000066;} .geshifilter .coMULTI {color: #808080; font-style: italic;} .geshifilter .es0 {color: #000099; font-weight: bold;} .geshifilter .br0 {color: #66cc66;} .geshifilter .st0 {color: #ff0000;} .geshifilter .nu0 {color: #cc66cc;} .geshifilter .sc0 {color: #00bbdd;} .geshifilter .sc1 {color: #ddbb00;} .geshifilter .sc2 {color: #009900;}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Progress Bar Demo</title>
    <style type="text/css">
        @import "http://o.aolcdn.com/dojo/1.0/dijit/themes/tundra/tundra.css";
        @import "http://o.aolcdn.com/dojo/1.0/dojo/resources/dojo.css"
    </style>
    <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.0/dojo/dojo.xd.js"
            djConfig="parseOnLoad: true">
</script>
    <script type="text/javascript">
        dojo.require("dijit.ProgressBar");
        dojo.require("dojo.parser");
       
        function download(){
            // Split up bar into 7% segments
            numParts = Math.floor(100/7);
            jsProgress.update({ maximum: numParts, progress:0 });
            for (var i=0; i<=numParts; i++){
                // This plays update({progress:0}) at 1nn milliseconds,
                // update({progress:1}) at 2nn milliseconds, etc.
                setTimeout(
                   "jsProgress.update({ progress: " + i + " })",
                   (i+1)*100 + Math.floor(Math.random()*100)
                );
            }
        }
     </script>

</head>
<body class="tundra">
    <div dojoType="dijit.ProgressBar" style="width:300px"
         jsId="jsProgress" id="downloadProgress">
</div>
    <input type="button" value="Go!" onclick="download();" />
</body></html>

See the API docs for more information on update().

Suppose you do not know the maximum up front. ProgressMeter has an indeterminate version, which does not display a percentage bar. Instead, an animation indicates that something is happening.

This code fragment displays the indeterminate progress meter while performing an XHR call. The time spent for the call is used to estimate the length of 10 calls, which will then be used as the maximum value. (Note: you will need to provide your own XHR url here.)

dojo.addOnLoad(function() {
	    // This starts the indeterminate bar
	    dijit.byId("setTestBar").update({indeterminate: true});
	    // Do a call to see what the average response time is
            timeStart = new Date();
	    var d = dojo.xhrGet({
	    	url: "../services/waste_time.jsp",
	        handleAs: "text"
	    });
	    d.addCallback(function() {
		    // Stop the indeterminate bar
		    dijit.byId("setTestBar").update({indeterminate: false});
		    avgTime = new Date() - timeStart;
		    //Now you can estimate the time for 10 calls
		    avgTime10 = avgTime * 10;
		    dijit.byId("setTestBar").update({maximum: avgTime10});
		});
	});
dijit.ProgressBar
a progress widget
Attributes
indeterminate Boolean
false
Default is false. Show progress true: show that a process is underway but that the progress is unknown
maximum Float
100
Maximum value possible
places Number
0
number of places to show in values; 0 by default
progress String
"0"
(Percentage or Number) initial progress value. with "%": percentage value, 0% <= progress <= 100% or without "%": absolute value, 0 <= progress <= maximum
Methods
update(/* Object */prg) update progress information - use progress, maximum and indeterminate properties in the object, just as in the attributes
Extension Points
onChange() Callback for when progress changes

Accessibility

The progress bar is made accessible by providing a solid border around the visual progress indicator. This border is visible in high contrast mode as well as when images are turned off.

The internalProgress div is assigned the ARIA role of progressbar The valuenow attribute is updated as the progress is updated. No valuemin and valuemax values are provided since the valuenow attribute may be a string provided by the Web developer.

Note: The hot key for the Window-Eyes screen reader to speak progress bar information is ctrl-ins-b. JAWS provides the hot key ins-tab for announcing progress bar name and status.JAWS also has a setting to select the frequency of progress bar announcements. Go to the Configuration Manager, Select Set Options, then User Options and select the desired announcement frequency.

Changes to accessibility for version 1.0 of the ProgressBar

The ARIA valuenow property is set to the ProgressBar's progress value. The valuemin and valuemax properties are set to 0 and the ProgressBar's maximum, respectively.

Tooltip

Tooltip is similar to the title="" attribute in regular HTML, but is much more flexible. You can control the display timing, and specify arbitrary HTML for the tooltip text.

Example

Longanimity
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */ .geshifilter {font-family: monospace;} .geshifilter .imp {font-weight: bold; color: red;} .geshifilter .kw1 {color: #b1b100;} .geshifilter .kw2 {color: #000000; font-weight: bold;} .geshifilter .kw3 {color: #000066;} .geshifilter .coMULTI {color: #808080; font-style: italic;} .geshifilter .es0 {color: #000099; font-weight: bold;} .geshifilter .br0 {color: #66cc66;} .geshifilter .st0 {color: #ff0000;} .geshifilter .nu0 {color: #cc66cc;} .geshifilter .sc0 {color: #00bbdd;} .geshifilter .sc1 {color: #ddbb00;} .geshifilter .sc2 {color: #009900;}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Tooltip Demo</title>
    <style type="text/css">
        @import "http://o.aolcdn.com/dojo/1.0.0/dijit/themes/tundra/tundra.css";
        @import "http://o.aolcdn.com/dojo/1.0.0/dojo/resources/dojo.css"
    </style>
    <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.0.0/dojo/dojo.xd.js"
        djConfig="parseOnLoad: true">
</script>
        <script type="text/javascript">
       dojo.require("dojo.parser");
       dojo.require("dijit.Tooltip");
     </script>
</head>
<body class="tundra">
        <span id="wordOfTheDay">longanimity</span>
        <div dojoType="dijit.Tooltip"
                   connectId="wordOfTheDay"
                   label="a disposition to bear injuries patiently : forbearance">

                   </div>
    <div id="wordOfTheDay">Longanimity</div>
</body></html>
dijit.Tooltip
Internal widget that holds the actual tooltip markup, which occurs once per page. Called by Tooltip widgets which are just containers to hold the markup
Attributes
connectId String Id of domNode to attach the tooltip to. (When user hovers over specified dom node, the tooltip will appear.) New in 1.0 You an also specify a comma-separated list of id to attach to multiple nodes. When using the programmatic interface, you can pass an array of Strings.
label String Text to display in the tooltip. Specified as innerHTML when creating the widget from markup.
showDelay Integer
400
Number of milliseconds to wait after hovering over/focusing on the object, before the tooltip is displayed.

Accessibility - updated for 1.0

General Issues

Tooltips are displayed when the associated item receives focus or a mouseover event. Be careful when assigning tooltips to arbitrary elements such as spans of text which may not receive keyboard focus because users of assistive technology or keyboard only users will not benefit from the tooltip. If the tooltip information is important, make certain that the item which triggers display of the tooltip can receive focus via the keyboard. This can be accomplished by adding a tabindex="0" attribute onto the trigger element to put it into the tab order of the page.

Dialog and TooltipDialog

Dijit's modal Dialog Box simulates a regular GUI dialog box. The contents can be arbitrary HTML, but are most often a form or a short paragraph. The user can close the dialog box without acting by clicking on the X button in the top-right corner.

Example

The following dialog box shows a simple Change Password form:

|
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */ .geshifilter {font-family: monospace;} .geshifilter .imp {font-weight: bold; color: red;} .geshifilter .kw1 {color: #b1b100;} .geshifilter .kw2 {color: #000000; font-weight: bold;} .geshifilter .kw3 {color: #000066;} .geshifilter .coMULTI {color: #808080; font-style: italic;} .geshifilter .es0 {color: #000099; font-weight: bold;} .geshifilter .br0 {color: #66cc66;} .geshifilter .st0 {color: #ff0000;} .geshifilter .nu0 {color: #cc66cc;} .geshifilter .sc0 {color: #00bbdd;} .geshifilter .sc1 {color: #ddbb00;} .geshifilter .sc2 {color: #009900;}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Dialog demo</title>
    <style type="text/css">
        @import "http://o.aolcdn.com/dojo/1.0/dijit/themes/tundra/tundra.css";
        @import "http://o.aolcdn.com/dojo/1.0/dojo/resources/dojo.css"
    </style>
    <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.0/dojo/dojo.xd.js"
        djConfig="parseOnLoad: true">
</script>
    <script type="text/javascript">
       dojo.require("dojo.parser");
       dojo.require("dijit.form.Button");
       dojo.require("dijit.Dialog");
       dojo.require("dijit.form.TextBox");
       function checkPw(dialogFields) {
          if (dialogFields.confirmpw != dialogFields.newpw)
             alert("Confirmation password is different.  Password is unchanged.");
       }
     </script>
</head>
<body class="tundra">
<button dojoType="dijit.form.Button" onclick="dijit.byId('dialog1').show()">Change Password</button>
<div dojoType="dijit.Dialog" id="dialog1" title="First Dialog" execute="checkPw(arguments[0]);">
    <table>
        <tr>
        <td><label for="name">Old Password: </label></td>
                <td><input dojoType="dijit.form.TextBox" type="password" name="oldpw"></td>
        </tr>
        <tr>
                <td><label for="loc">New Password: </label></td>
                <td><input dojoType="dijit.form.TextBox" type="password" name="newpw"></td>
        </tr>
        <tr>
                <td><label for="desc">Confirm New Password: </label></td>
                <td><input dojoType="dijit.form.TextBox" type="password" name="confirmpw"></td>
        </tr>
        <tr>
                <td colspan="2" align="center">
                        <button dojoType=dijit.form.Button type="submit">OK</button></td>
        </tr>
    </table>
</div>
</body></html>

Everything in the dialog box is wrapped in an implicit form. The code in the execute() attribute is executed when the dialog is submitted normally.

Auto-focusing The First Text Box (For 1.0)

Dialog, like most forms, does not automatically set the focus on the first form field. To do this with Dijit Dialog or TooltopDialog, simply define this code snippet once:

var focusFirstInput = function(e) { 
   dijit.focus(dojo.query('input', this.domNode)[0]); 
}

Then use dojo.connect to hook it to each dialog's onOpen event:

var c = dojo.connect(someDialogWidget, 'onOpen', dojo.hitch(someDialogWidget, focusFirstInput));

In 1.1 the Dialog has been updated to find and set focus to the first focusable element within the dialog. Thus, the above code snippet is no longer necessary in 1.1. See additional information in the 1.1 Accessibility section below.

TooltipDialog

A variant on Dialog Box is dijit.TooltipDialog. This displays the dialog box contents in a Tooltip

Although both Dialog and TooltipDialog are modal, TooltipDialog can be closed by clicking anywhere on the screen, whereas for Dialog you must click on the [x] mark of the Dialog.

A TooltipDialog appears as a drop down from a button, similar to a drop down button.

Example

Change Password
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */ .geshifilter {font-family: monospace;} .geshifilter .imp {font-weight: bold; color: red;} .geshifilter .kw1 {color: #b1b100;} .geshifilter .kw2 {color: #000000; font-weight: bold;} .geshifilter .kw3 {color: #000066;} .geshifilter .coMULTI {color: #808080; font-style: italic;} .geshifilter .es0 {color: #000099; font-weight: bold;} .geshifilter .br0 {color: #66cc66;} .geshifilter .st0 {color: #ff0000;} .geshifilter .nu0 {color: #cc66cc;} .geshifilter .sc0 {color: #00bbdd;} .geshifilter .sc1 {color: #ddbb00;} .geshifilter .sc2 {color: #009900;}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TooltipDialog demo</title>
    <style type="text/css">
        @import "http://o.aolcdn.com/dojo/1.0/dijit/themes/tundra/tundra.css";
        @import "http://o.aolcdn.com/dojo/1.0/dojo/resources/dojo.css"
    </style>
    <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.0/dojo/dojo.xd.js"
        djConfig="parseOnLoad: true">
</script>
    <script type="text/javascript">
       dojo.require("dojo.parser");
       dojo.require("dijit.form.Button");
       dojo.require("dijit.Dialog");
       dojo.require("dijit.form.TextBox");
       function checkPw(dialogFields) {
          if (dialogFields.confirmpw != dialogFields.newpw)
             alert("Confirmation password is different.  Password is unchanged.");
       }
     </script>
</head>
<body class="tundra">
<div dojoType="dijit.form.DropDownButton">
        <span>Change Password</span>
        <div dojoType="dijit.TooltipDialog" id="dialog1" title="First Dialog" execute="checkPw(arguments[0]);">
            <table>
                <tr>
                <td><label for="name">Old Password: </label></td>
                        <td><input dojoType="dijit.form.TextBox" type="password" name="oldpw"></td>
                </tr>
                <tr>
                        <td><label for="loc">New Password: </label></td>
                        <td><input dojoType="dijit.form.TextBox" type="password" name="newpw"></td>
                </tr>
                <tr>
                        <td><label for="desc">Confirm New Password: </label></td>
                        <td><input dojoType="dijit.form.TextBox" type="password" name="confirmpw"></td>
                </tr>
                <tr>
                        <td colspan="2" align="center">
                                <button dojoType=dijit.form.Button type="submit">OK</button></td>
                </tr>
            </table>
        </div>
</div>
</body></html>
dijit.Dialog, dijit.TooltipDialog
Simulates GUI Dialog box. Dialog displays forms overlaying the current page, TooltipDialog displays form in a tooltip.
Attributes
errorMessage String
Locale dep.
Message that shows if an error occurs
extractContent Boolean
false
Extract visible content from inside of <body> .... </body>
href String The href of the content that displays now. Set this at construction if you want to load data externally when the pane is shown. (Set preload=true to load it immediately.) Changing href after creation does not have any effect; see setHref();
isLoaded Boolean
false
Tells loading status see onLoad|onUnload for event hooks
loadingMessage String
Locale dep.
Message that shows while downloading
open Boolean
false
Is dialog box initially open
parseOnLoad Boolean
true
parse content and create the widgets, if any
preload Boolean
false
Force load of data even if pane is hidden.
preventCache Boolean
false
Cache content retreived externally
refreshOnShow Boolean
false
Refresh (re-download) content when pane goes from hidden to shown
title String (TooltipDialog only) Description of tooltip dialog (required for a11Y). For regular dialogs, you can set dijit.byId("dlg").titleNode.innerHTML to change the title.
Methods
cancel() Cancels a inflight download of content
hide() Hide the dialog if we haven't been initialized yet then we aren't showing and we can just return
layout() Sets the background to the size of the viewport (rather than the size of the document) since we need to cover the whole browser window, even if the document is only a few lines long.
orient(/*Object*/ corner) (TooltipDialog only) configure widget to be displayed in given position relative to the button. See dijit.Tooltip for notes on positioning
refresh() Force a refresh (re-download) of content, be sure to turn off cache we return result of _prepareLoad here to avoid code dup. in dojox.layout.ContentPane
resize(/* String */size) Explicitly set this widget's size (in pixels), and then call layout() to resize contents (and maybe adjust child widgets)
setContent(/*String|DomNode|Nodelist*/data) Replaces old content with data content, include style classes from old content
setHref(/*String|Uri*/ href) Reset the (external defined) content of this pane and replace with new url Note: It delays the download until widget is shown if preload is false
show() Dialog only display the dialog first time we show the dialog, there's some initialization stuff to do
Extension Points
onContentError(/*Error*/ error) called on DOM faults, require fault etc in content default is to display errormessage inside pane
onDownloadEnd() called when download is finished
onDownloadError(/*Error*/ error) Called when download error occurs, default is to display errormessage inside pane. Overide function to change that. The string returned by this function will be the html that tells the user a error happend
onDownloadStart() called before download starts the string returned by this function will be the html that tells the user we are loading something override with your own function if you want to change text
onLoad(/* Event */e) Event hook, is called after everything is loaded and widgetified
onOpen(/*Object*/ pos) (TooltipDialog only) called when dialog is displayed. See dijit.Tooltip for pos details.
onUnload(/* Event */e) Event hook, is called before old content is cleared

Accessibility (added for 1.0)

General

When a dialog is opened focus goes to the title section of the dialog. This was implemented to provide screen reader support to speak the title of the dialog when it is opened. Likewise, when a tooltip dialog is opened, focus is placed on the container of the tooltip dialog. In future versions of the dialog and tooltip dialog widgets, focus will go to the first item in the dialog or tooltip dialog.

When focus is in a dialog, pressing the tab key will move focus forward to each focusable element within the dialog. When focus reaches the last focusable element in the dialog, pressing tab will cycle focus back to the dialog title. Pressing shift-tab will move focus backwards through focusable elements within the dialog until the dialog title is reached. If focus has previous cycled forward through all of the elements, pressing shift-tab with focus on the dialog title will move focus to the last element in the dialog. If focus has not previously been cycled through all of the focusable elements in the dialog using the tab key, pressing shift-tab with focus on the dialog title will leave focus in the title. The same focus cycling applies to the tooltip dialog as well with focus being set to the tooltip dialog container since there is no dialog title.

Known Issue: On Windows, In Firefox 2, when in High Contrast mode, the dialog with display correctly, but the underlying page will not be seen.

Keyboard

ActionKey
Navigate to next focusable element in the dialog/tooltip dialogtab
Navigate to previous focusable element in the dialog/tooltip dialogshift-tab (see general section above for additional details)
Close the dialog/tooltip dialogescape

Accessibility (Updated for 1.1 and 1.2)

General

When a dialog is opened focus goes to the first focusable element within the dialog. The first focusable element may be an element which appears in the tab order by default such as a form field or link, an element with a tabindex attribute value of 0 or an element with a tabindex value greater than 0. Elements with a tabindex value greater than 0 will appear in the tab order before elements with a tabindex of 0 or those in the tab order by default. If the dialog does not contain a focusable item, focus will be set to the dialog container element when the dialog is opened. The same focus behavior has been implemented for tooltip dialog

When focus is in a dialog, pressing the tab key will move focus forward to each focusable element within the dialog. When focus reaches the last focusable element in the dialog, pressing tab will cycle focus back to the first focusable item. Pressing shift-tab will move focus backwards through focusable elements within the dialog. When the first focusable item is reached, pressing shift-tab will move focus to the last focusable item in the dialog.

Known Issues:

  • On Windows, In Firefox 2, when in High Contrast mode, the dialog with display correctly, but the underlying page will not be seen.
  • Special behavior for Input type=file elements as the first or only focusable element in a dialog.
    • Dialogs with an input type=file as the only focusable element will not work with the keyboard. This is because input type=file elements require two tab stops - one in the textbox and the other on the "Browse" button. Rather than clutter the dialog box widget with code to special case for this one condition, dialog boxes with an input type=file as the only focusable element are not supported.
    • Dialogss with an input type=file element as the first focusable element in Firefox (and there are additional focusable elements). Programmatically setting focus to an input type=file element behaves oddly in Firefox. In this case the focus is set onto the textbox field and then immediately moved onto the browse button of the input type=file field. This causes problems in Firefox when setting focus to an input type=file element as the first element as a dialog or tooltip dialog. For this reason, in Firefox if the first focusable item in a dialog or tooltip dialog is an input type=file, focus will be set onto the dialog container rather than the input element. For these reasons it is recommended that input type=file elements not be added as the only or first focusable item within a dialog or tooltip dialog in Firefox.
  • Even though the dialog is marked with the proper ARIA role of dialog, JAWS 9 does not speak "dialog" when the dialog is opened. In Firefox 2 even though the focus is on the first focusable item in the dialog, the information about that item is also not spoken. Thus, it is important that the instructions or label for a trigger element that opens a dialog to indicate via text that a dialog will be opened. In Firefox 3 the dialog is also not announced but the information about the item in the dialog which gets focus is spoken. This will hopefully be corrected in a future release of JAWS.
  • There are focus issues when the dialog is created via an href. Due to timing issues focus may not be properly set nor properly trapped in the dialog. For accessibility reasons, dialogs created via href are not recommended. This issue will be looked at for Dojo 1.2.

Keyboard

ActionKey
Navigate to next focusable element in the dialog/tooltip dialogtab
Navigate to previous focusable element in the dialog/tooltip dialogshift-tab
Close the dialog/tooltip dialogescape

TitlePane

A TitlePane is a pane with a title on top that can be opened or collapsed. The visibility of the container is toggled by activating an arrow "button" on the title bar via the mouse or keyboard.

Examples

The rain in Spain falls mainly on the New York Stock Exchange.
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */ .geshifilter {font-family: monospace;} .geshifilter .imp {font-weight: bold; color: red;} .geshifilter .kw1 {color: #b1b100;} .geshifilter .kw2 {color: #000000; font-weight: bold;} .geshifilter .kw3 {color: #000066;} .geshifilter .coMULTI {color: #808080; font-style: italic;} .geshifilter .es0 {color: #000099; font-weight: bold;} .geshifilter .br0 {color: #66cc66;} .geshifilter .st0 {color: #ff0000;} .geshifilter .nu0 {color: #cc66cc;} .geshifilter .sc0 {color: #00bbdd;} .geshifilter .sc1 {color: #ddbb00;} .geshifilter .sc2 {color: #009900;}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TitlePane Demo</title>
    <style type="text/css">
        @import "http://o.aolcdn.com/dojo/1.0/dijit/themes/tundra/tundra.css";
        @import "http://o.aolcdn.com/dojo/1.0/dojo/resources/dojo.css"
    </style>
    <script type="text/javascript" src="http://o.aolcdn.com/dojo/1.0/dojo/dojo.xd.js"
        djConfig="parseOnLoad: true">
</script>
        <script type="text/javascript">
           dojo.require("dojo.parser");
           dojo.require("dijit.TitlePane");
     </script>
</head>
<body class="tundra">
        <div dojoType="dijit.TitlePane" title="A Message from Thurston Howell III">
           The rain in Spain falls mainly on the New York Stock Exchange. 
        </div>
</body></html>
dijit.TitlePane
A pane with a title on top, that can be opened or collapsed.
Attributes
duration Integer
250
milliseconds to fade in/fade out
open Boolean
true
Whether pane is opened or closed.
title String Title of the pane. Use setTitle() to change after creation time.
Methods
setContent(/* String */content) Typically called when an href is loaded. Our job is to make the animation smooth
setTitle(/* String */title) sets the text of the title
toggle() switches between opened and closed state

Accessibility (updated for 1.0)

Keyboard

Each title pane title is included in the tab order of the document.

ActionKey
toggle open/close of the title paneenter or space key with focus on the title pane title
Navigate into an opened title panetab

Screen Reader Information

The title pane container will have an ARIA labelledby property which points to the id of the title pane title. The title pane title has the ARIA role of button and property of haspopup=true to indicate that it controls the display of the pane. The role of button is used to indicate to the user that an action will occur when the button is activated. The tilte pane container will have an ARIA role of region which will be supported in Firefox 3 and identified by future versions of the screen readers.