Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/z-input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@ export class ZInput {
}

private renderShowHidePassword(): HTMLButtonElement {
// WCAG 2.5.2 (Pointer Cancellation): onClick fires on pointer/touch up-event,
// allowing users to cancel by moving away before release. Do not add touchstart
// or pointerdown handlers that execute the toggle action.
return (
<button
type="button"
Expand Down
3 changes: 3 additions & 0 deletions src/components/z-input/styles-text.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
.text-wrapper .icons-wrapper > button.reset-icon,
.text-wrapper .icons-wrapper > button.toggle-password-icon {
cursor: pointer;

/* WCAG 2.5.2: Prevent double-tap-to-zoom gesture from being confused with button activation */
touch-action: manipulation;
}

.text-wrapper .icons-wrapper > .input-icon {
Expand Down