Langsung ke konten
Skillpedia
Website & UI (frontend)75k Β· #3060

touch-targets

Fungsinya

Skill ini memeriksa bahwa item yang dapat diklik di layar sentuh cukup besar. Skill ini cocok untuk desainer dan developer yang menginginkan situs yang mudah digunakan dengan sentuhan.

Kapan dipakai

  • βœ“Saat tombol berbasis ikon seperti tutup atau hapus sangat kecil di ponsel.
  • βœ“Saat tata letak seluler memiliki tautan atau kontrol formulir yang saling berdekatan.
  • βœ“Saat tinjauan aksesibilitas menandai target sentuh di bawah ukuran yang direkomendasikan.

Link skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/touch-targets/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/touch-targets/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œTombol tutup di menu seluler saya sangat kecil dan sulit diketuk. Bisakah Anda memeriksa ukurannya?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mengukur elemen interaktif, termasuk padding-nya. Agent menandai yang kecil dan menyarankan area sentuh yang lebih besar tanpa mengubah ukuran tampilannya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Provide sufficient touch target size

Motor disabilities such as essential tremor, Parkinson's disease, hemiplegia, and spasticity make it difficult to tap small targets with precision. A 24Γ—24px icon button with no padding requires a fine-motor action that many users simply cannot perform. Insufficient tap target size is one of the most common barriers for users with mobility impairments on mobile and tablet devices. Even users without disabilities benefit from larger targets, reducing accidental activations.

Quick Reference

  • WCAG 2.2 SC 2.5.5 (AAA): touch targets must be at least 44Γ—44 CSS pixels
  • WCAG 2.2 SC 2.5.8 (AA, new in WCAG 2.2): targets must be at least 24Γ—24 CSS pixels OR have 24px of spacing from other targets
  • Apple HIG recommends 44Γ—44 pt minimum; Google Material Design recommends 48Γ—48 dp minimum
  • Use padding to enlarge the interactive area without changing the visual size
  • Inline text links are exempt from SC 2.5.8

Check

Find all interactive elements: <button>, <a>, <input>, <select>, <textarea>, and elements with click/touch event handlers or role='button'. For each, compute the rendered bounding box size (including padding). Flag elements whose width or height is less than 24px (WCAG 2.2 AA threshold) or less than 44px (AAA / platform guidelines). Also check spacing: elements smaller than 44px should have at least 24px of clear space from adjacent interactive elements.

Fix

To increase touch target size without changing visual appearance: (1) Add padding to the element β€” e.g., padding: 12px on a button adds 12px to each side of the visual content. (2) Use min-width and min-height to enforce a floor: min-width: 44px; min-height: 44px. (3) For icon-only buttons, use a transparent pseudo-element to extend the hit area: .icon-btn::before { content: ''; position: absolute; inset: -12px; } with position: relative on the button. (4) Ensure adequate spacing between small targets so users do not accidentally activate the wrong element.

Explain

WCAG 2.2 introduced SC 2.5.8 (Target Size, Minimum) at Level AA, requiring touch targets to be at least 24Γ—24 CSS pixels or have 24px of offset spacing from neighboring targets. The older SC 2.5.5 (Target Size) at Level AAA recommends 44Γ—44px. These thresholds are based on average human fingertip size (approximately 10mm) and the precision required for touchscreen interaction. Users with tremors or limited dexterity need larger targets because their touch point can deviate by 20–30px from where they intend. The 44px recommendation aligns with Apple's Human Interface Guidelines and Google's Material Design system.

Code Review

Review the rendered markup and interactive states that affect Provide sufficient touch target size. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/accessibility/touch-targets

Pertanyaan umum

Berapa ukuran target sentuh yang ideal?

Skill menyebutkan 44 kali 44 piksel sebagai panduan umum, dan 24 kali 24 piksel sebagai minimum menurut WCAG 2.2.

Bisakah saya memperbesar area yang bisa diketuk tanpa mengubah tampilannya?

Bisa. Skill menyarankan memakai padding untuk memperbesar area yang dapat diklik, sementara ukuran yang terlihat tetap sama.

Apakah tautan teks harus memenuhi aturan ukuran yang sama?

Tidak. Skill menyatakan tautan teks inline dikecualikan dari aturan ukuran minimum.

Detail

Deskripsi asli dari pembuat

Use when applies to all interactive elements on touchscreen interfaces: buttons, links, checkboxes, radio buttons, form inputs, icon buttons, and menu items. Check CSS for min-width, min-height, width, height, and padding on interactive elements. Particularly important for icon-only buttons (close, delete, share) which are often made too small.

repo: thedaviddias/Front-End-Checklist

Popularitas

Bintang GitHub
75k
Peringkat
#3060
Lisensi
MIT
Diperbarui
31/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa