* resolves https://github.com/nextcloud-libraries/nextcloud-vue/issues/2844 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>pull/55273/head
parent
e6d9974b2d
commit
6543ee22a6
@ -1,21 +0,0 @@ |
||||
/** |
||||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors |
||||
* SPDX-License-Identifier: AGPL-3.0-or-later |
||||
*/ |
||||
|
||||
/** |
||||
* Return whether the DOM event is an accessible mouse or keyboard element activation |
||||
* |
||||
* @param {Event} event DOM event |
||||
* |
||||
* @return {boolean} |
||||
*/ |
||||
export const isA11yActivation = (event) => { |
||||
if (event.type === 'click') { |
||||
return true |
||||
} |
||||
if (event.type === 'keydown' && event.key === 'Enter') { |
||||
return true |
||||
} |
||||
return false |
||||
} |
Loading…
Reference in new issue