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 09:31:04 UTC