Improve login accessibility

This commit is contained in:
Eva 2022-11-28 08:44:19 +01:00 committed by Andrey Antukh
parent 8bc265a598
commit 95a18fce8d
20 changed files with 978 additions and 251 deletions

View file

@ -0,0 +1,20 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.components.link
(:require
[app.util.keyboard :as kbd]
[rumext.v2 :as mf]))
(mf/defc link [{:keys [action name klass data-test]}]
[:a {:on-click action
:klass klass
:on-key-down (fn [event]
(when (kbd/enter? event)
(action event)))
:tabindex "0"
:data-test data-test}
name])