From f2a867871505712ed9da982528af2fc54137ba38 Mon Sep 17 00:00:00 2001 From: igoradamenko Date: Mon, 7 Jan 2019 00:37:59 +0200 Subject: [PATCH] add tabindex: 0 on buttons only if they have handlers --- web/app/common/accessibility.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/common/accessibility.js b/web/app/common/accessibility.js index c4bf4ab2..35d7f1c7 100644 --- a/web/app/common/accessibility.js +++ b/web/app/common/accessibility.js @@ -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 } : {}), });