WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: 4.1.2 correct roles

for

From: Birkir R. Gunnarsson
Date: Aug 24, 2022 3:01AM


A heading is not the right role for the element. A heading is a
static, structural role, it does not tell someone using a screen
reader that the heading can be clicked. The role should be button.

This example also fails keyboard accessibility (WCAG 2.1.1), it can't
be focused/activated with the keyboard.


On 8/24/22, konstantin galiakhmetov < <EMAIL REMOVED> > wrote:
> hello all:
> how do you thinkk The Following Code Snippet is a failure of SC 4.1.2 or
> not?
> <h1 onclick="alert('hello')">Test</h1>
> SC4.1.2  requreis that For all user interface components role can be
> programmatically determined and in this code snipped the role can be
> programmatically determined. I mean <h1> has  implicit role "heading" so
> here no any errors. Or not?
> what do you think about it?
>
> > > > >


--
Work hard. Have fun. Make history.