From 113f5aea4191090fe742f9114e02dccb82b8e810 Mon Sep 17 00:00:00 2001 From: tanhauhau Date: Tue, 13 Sep 2022 19:32:59 +0800 Subject: [PATCH] update docs --- site/content/docs/05-accessibility-warnings.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/site/content/docs/05-accessibility-warnings.md b/site/content/docs/05-accessibility-warnings.md index a7c1b8ded8..c82ef21fcb 100644 --- a/site/content/docs/05-accessibility-warnings.md +++ b/site/content/docs/05-accessibility-warnings.md @@ -41,6 +41,19 @@ Enforce that `autofocus` is not used on elements. Autofocusing elements can caus --- +### `a11y-click-events-have-key-events` + +Enforce `on:click` is accompanied by at least one of the following: `onKeyUp`, `onKeyDown`, `onKeyPress`. Coding for the keyboard is important for users with physical disabilities who cannot use a mouse, AT compatibility, and screenreader users. + +This does not apply for interactive or hidden elements. + +```sv + +
{}} /> +``` + +--- + ### `a11y-distracting-elements` Enforces that no distracting elements are used. Elements that can be visually distracting can cause accessibility issues with visually impaired users. Such elements are most likely deprecated, and should be avoided.