add tabindex: 0 on buttons only if they have handlers
This commit is contained in:
@@ -7,7 +7,7 @@ const handleBtnKeyPress = (event, handler) => {
|
||||
|
||||
export const getHandleClickProps = handler => ({
|
||||
role: 'button',
|
||||
tabIndex: 0,
|
||||
onClick: handler,
|
||||
onKeyPress: event => handleBtnKeyPress(event, handler),
|
||||
...(handler ? { tabIndex: 0 } : {}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user