SaraVieira / awesome-talks

Awesome Talks Curated By the Community
MIT License
809 stars 62 forks source link

Add new talk button keyboard functionality #75

Closed scottaohara closed 6 years ago

scottaohara commented 6 years ago

The "Add new talk" button now announces itself as a button and is accessible by the tab key per PR #74, but additional functionality needs to be added to this element.

Since this is a role="button" and not a true <button> element, space and enter keys do not activate the button in all browsers.

Ideally this element would be turned into a true button element and then it would work as expected. The role="button" and tabIndex="0" could then be removed. The CSS would need to be revised to allow the button element to be styled like a elements.

If changing the element is not possible, then additional JS needs to be added to allow for space and enter keys to fire the onClick function correctly.

Thanks!

sudovijay commented 6 years ago

turning the element to button seems better idea, much better than using JS on the element, making changes .. thanks ! @scottaohara never thought of this tbh !

SaraVieira commented 6 years ago

@sudovijay sorry man, I already done this, I have too much free time :(

https://github.com/SaraVieira/awesome-talks/pull/76

sudovijay commented 6 years ago

lol @SaraVieira your fast, i actual did this too but didn't push , it just i was lookin into styled component docs to check if there's any other way to extend global styles in it without using class.