mozilla / SocialShare

Protect users' privacy - share user data only when people are ready to share.
BSD 3-Clause "New" or "Revised" License
27 stars 10 forks source link

Keyboard, sprite and aria support added #25

Closed icaaq closed 12 years ago

icaaq commented 12 years ago

Enhanced the code with keyboard support and added aria-states when open/closed.

Added sprite .png and .psd (not sure where you wanted the .psd in the project so I added it to "src/img")

Did not remove the original png

the branch can be looked at here http://icaaq.com/sandbox/mozilla/SocialShare/large.html and here http://icaaq.com/sandbox/mozilla/SocialShare/small.html

My LESS knowledge is less than perfect, so please look if there can be optimizations there.

This will solve [Bug 747963 - Social sharing library: add ability to open/close the window with keyboard]

tallowen commented 12 years ago

This looks good, thanks for the pull request.

I'm wondering why you added aria-expanded attribute the plug-in is already adding the open class to the parent div - is that not enough? it seems to me that It would be better to use one method for determining weather the plug-in is open or closed.

icaaq commented 12 years ago

aria-expanded tells screen readers that the element is controlling another elements state. Read more about it in the aria spec.

http://www.w3.org/TR/wai-aria/states_and_properties#aria-expanded