RE: A tag looking like a BUTTON tag. Fail?

> Not so much what it looks like, but whether it behaves in accordance 
with the role it exposes / that the role it exposes is actually 
reflective of its behaviour.

Yes, I agree that the role and behaviour should match, but there are cases in which the distinction between action and navigation is ambiguous or subjugated to implementation or design pressures.

So, while the 'buttons are for actions and hyperlinks are for navigation' rule-of-thumb works in most cases, I find the case can be tricky to make, given that the normative/non-normative distinction is of lesser significance to people on the coalface and there is a gap in the specification.

Is the web mature enough to be able to codify these kinds of things in meaningful ways to minimise the need to prosecute such cases in the future? 

Cheers,
Adam 


-----Original Message-----
From: Patrick H. Lauke <redux@splintered.co.uk> 
Sent: Wednesday, May 29, 2019 7:31 PM
To: w3c-wai-ig@w3.org
Subject: Re: A tag looking like a BUTTON tag. Fail?

On 29/05/2019 05:55, Adam Cooper wrote:
>> Of course, if the question was in fact about controls that act as buttons BUT are marked as links styled as buttons, yes agree it's bad, and THAT would fail 4.1.2 and possibly 2.4.4
> 
> Agreed, it's bad practice and (as a screen reader user) very irritating for actions to be bound to (programmatic) links, but does SC 4.1.2 cover what a button looks like and does?

Not so much what it looks like, but whether it behaves in accordance 
with the role it exposes / that the role it exposes is actually 
reflective of its behaviour.

> That is, a (programmatic) link styled to appear like a button and acting like a button does already have a programmatically determinable role - it just happens to be 'link'.

It seems that the intent (based on the understanding doc) was for role 
to properly expose what the control does when it's scripted/changed - 
but yes, a very strict reading of the normative SC text doesn't seem to 
specify that.

"If custom controls are created, however, or interface elements are 
programmed (in code or script) to have a different role and/or function 
than usual, then additional measures need to be taken to ensure that the 
controls provide important information to assistive technologies and 
allow themselves to be controlled by assistive technologies."

https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html

But yes, granted that this is taking non-normative wording/interpretation.

> And how would this same control fail 2.4.4?

That will be dependent on the actual text used for that link. If the 
text was just "Go" or "Submit", you could argue that it's not clear when 
it's a link what/where it would lead the user (assuming no further 
context, like text in the same paragraph or similar, is present). But it 
will depend on the specific wording and situation, as ever...not an 
automatic "this will also always fail 2.4.4".

P
-- 
Patrick H. Lauke

www.splintered.co.uk | https://github.com/patrickhlauke

http://flickr.com/photos/redux/ | http://redux.deviantart.com

twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Wednesday, 29 May 2019 23:58:43 UTC