E-mail List Archives
Thread: 4.1.2 correct roles
Number of posts in this thread: 7 (In chronological order)
From: konstantin galiakhmetov
Date: Wed, Aug 24 2022 2:44AM
Subject: 4.1.2 correct roles
No previous message | Next message →
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?
From: Mark Magennis
Date: Wed, Aug 24 2022 2:59AM
Subject: Re: 4.1.2 correct roles
← Previous message | Next message →
Konstantin,
Functionally this is a button so it should have a button role. It's okay to have an element that is both a heading and a button though:
<h1><button onclick="alert('hello')">Test</button></h1>
Note that the button must be within the heading, not the heading within the button.
Mark
From: Birkir R. Gunnarsson
Date: Wed, Aug 24 2022 3:01AM
Subject: Re: 4.1.2 correct roles
← Previous message | Next message →
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 ADDRESS 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.
From: konstantin galiakhmetov
Date: Wed, Aug 24 2022 8:23AM
Subject: Re: 4.1.2 correct roles
← Previous message | Next message →
hello,
yes, i think that the heading is not correct role too,but
it is seems that SC4.1.2 does not require a correct role, it requires
that role can be programmatically determined at all Or not?
i jast trie to understand.
thank in advance!
From: Birkir R. Gunnarsson
Date: Wed, Aug 24 2022 8:52AM
Subject: Re: 4.1.2 correct roles
← Previous message | Next message →
It's a fail of 1.3.1 (semantics) even if it does not directly fail
4.1.2. Welcome to WCAG gymnastics
On 8/24/22, konstantin galiakhmetov < = EMAIL ADDRESS REMOVED = > wrote:
> hello,
>
> yes, i think that the heading is not correct role too,but
>
> it is seems that SC4.1.2 does not require a correct role, it requires
> that role can be programmatically determined at all Or not?
> i jast trie to understand.
>
>
> thank in advance!
> > > > >
--
Work hard. Have fun. Make history.
From: wolfgang.berndorfer
Date: Wed, Aug 24 2022 10:26AM
Subject: Re: 4.1.2 correct roles
← Previous message | Next message →
I would suppose that the following interpretation of 4.1.2 would make no sense:
âAll user interface components need ANY role that can be programmatically determined.â
Here is a fitting sufficient technique for this misinterpretation:
âMark up each user interface component as a link.â
F59 states that using script to make div or span a user interface control is a failure.
https://www.w3.org/WAI/WCAG21/Techniques/failures/F59
Why is it a failure?
âAssistive technologies rely on knowledge of the role and current state of a component in order to provide that information to the user.â
IMO the spirit of SC 4.1.2 is to apply the FITTING role.
From: Laura Fathauer
Date: Wed, Aug 24 2022 12:10PM
Subject: Re: 4.1.2 correct roles
← Previous message | No next message
Note there is a connection to function in the definition of "role":
role: text or number by which software can identify the function of a
component within Web content
From my perspective, if something functions as a "link" and your text says
"listbox," then by 4.1.2 you don't have a programmatically determinable
"role" since the text isn't actually describing the function.
Laura
On Wed, Aug 24, 2022 at 12:26 PM < = EMAIL ADDRESS REMOVED = >
wrote:
> I would suppose that the following interpretation of 4.1.2 would make no
> sense:
> âAll user interface components need ANY role that can be programmatically
> determined.â
> Here is a fitting sufficient technique for this misinterpretation:
> âMark up each user interface component as a link.â
>
> F59 states that using script to make div or span a user interface control
> is a failure.
> https://www.w3.org/WAI/WCAG21/Techniques/failures/F59
> Why is it a failure?
> âAssistive technologies rely on knowledge of the role and current state of
> a component in order to provide that information to the user.â
>
> IMO the spirit of SC 4.1.2 is to apply the FITTING role.
>
>
>