Is it a button or a div? A quick check for keyboard-accessible clickable elements
Landing pages often contain elements that look like buttons, such as menu toggles and tabs, but are built as generic tags with click handlers. Such elements are not reachable by keyboard or announced correctly by screen readers, unlike native button elements. The W3C's WCAG 4.1.2 guidance requires that custom controls expose the correct name and role to assistive technology. The author also notes that a button inside a form submits by default unless type="button" is set. A simple test is to tab through the page, check each unreachable element's tag, and verify that Enter and Space activate it.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in