Closed scottaohara closed 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 !
@sudovijay sorry man, I already done this, I have too much free time :(
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.
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. Therole="button"
andtabIndex="0"
could then be removed. The CSS would need to be revised to allow thebutton
element to be styled likea
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!