yui/yui3 — pull request #1424 by gerardkcohen (2013-11-21 12:00:48+00:00)
Title: [Panel] Accessibility Enhancements

This initial PR is for feedback only.

Adding the following accessibility improvements to Panel:

* Focus Management
* `Tab` and `Shift + Tab` cycle focus within the Panel
* Upon dismissing the Panel, focus is returned to the trigger that initially launched the Panel (via Widget-Modality)
* The default Close button is configured with `isDefault` so that focus is immediately applied upon displaying the Panel
* ARIA Roles/ Properties
* A new attribute `panelType` that accepts values of `simple` or `complex` which are used to determine whether the Panel has an ARIA role of `alertdialog` (panelType: simple) or `dialog` (panelType: complex). Documentation and examples will show that that a simple Panel is defined as having a small amount of text or a message that alerts, warns, or requests information. A complex Panel is a Panel that includes large amounts of text or Form elements/ other interactive elements. A complex Panel also adds a role of `document` on the Panel body. Default panelType is `simple`
* The property `aria-describedby` is placed on the bounding box and references the Panel's body.
* A new attribute `title` is added and is wrapped by a `

` tag. HTML_PARSER is included. `aria-labelledby` is placed on the bounding box and references the title. Documentation and examples will show how to properly markup subtitles within the title and how `headerContent` can still be used in conjunction with the title. CSS styles have been updated to maintain the `

` style
* Panel visibility is communicated via the 'aria-hidden' property on the bounding box.
* If the Panel is modal, 'aria-hidden' is set to `true` on the body so as not to confuse AT users (via Widget-Modality)

User Guides/ examples and unit tests have not been updated yet because I wanted to get feedback and finalize the code. The unit tests are still passing with these modifications though.