openlayers/openlayers — pull request #223 by elemoine (2012-02-15 16:11:02+00:00)
Title: accessible panel buttons

This pull request makes it possible to create accessible panel buttons. Issues #191 and #192 are related to this pull request.

Currently panel buttons are divs with background images, so they're not accessible. See #192 for more information.

This pull request

- modifies ```Control.Panel``` to move the code that creates the control markup in its own function. This allows overriding this function at the application level to create a custom (accessible) markup. The API docs include an example.

- modifies ```Events.buttonclick``` to trigger ```buttonclick``` events when the RETURN and SPACE keys are pressed. See #191. (Thanks @ahocevar for suggesting to rely on key events!)

- adds an accessible-panel example demonstrating how to create CSS-styled accessible panel buttons.

The example works in Chrome, FireFox and IE 8. The tests pass in these browsers.