W3C home > Mailing lists > Public > public-html@w3.org > June 2010

Re: Change proposal for ISSUE-85

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 17 Jun 2010 12:34:47 +0200
Message-ID: <4C19FA47.1050408@lachy.id.au>
To: Jonas Sicking <jonas@sicking.cc>
Cc: public-html@w3.org
On 2010-06-17 12:15, Jonas Sicking wrote:
> On Thu, Jun 17, 2010 at 2:54 AM, Lachlan Hunt<lachlan.hunt@lachy.id.au>  wrote:
>> My understanding of what Richard is saying is that by making it a
>> conformance error, the result of reporting an error for<a role="button">
>> will be for authors to simply remove the role attribute, even if the link
>> really is behaving like a button, rather than changing it to a real button.
>
> Is there anything to substantiate this concern? I.e. has anyone ever
> heard of this happening in practice?

We see this all the time with the target attribute where authors who are 
concerned about validation do avoid the target attribute, but substitute 
it for a technique that bypasses the validator with the same result. 
There's a small chance that this could happen with role too, but given 
the less noticeable perceived benefits from it and so it may not be 
deemed worth the effort, and simply settle on removing it without 
substituion.  Although, if it gets done by JS libraries, then the 
practice would probably become widespread anyway.

>> In practice, however, we find that most authors simply avoid this hassle of
>> styling buttons to look like links in favour of simply using a link with
>> script to satisfy the behavioural implementation requirements. Even though
>> from theoretical point of view, doing so may be less than ideal, web
>> developers have to make a trade off between semantic purity and matching the
>> client's requirements in a cost effective and timely manner.  Spending time
>> replicating the look and feel of a link by styling a button often loses out
>> to simply using a link and getting the job done faster.
>
> Out of curiosity, how much CSS was required to do this? If an
> implementation follows the recommendations of the HTML5 rendering
> section, then I think the following CSS should be enough:
>
> .buttonAsLink {
>    binding: none;
>    color: blue;
>    text-decoration: underline;
> }

This was a few years ago (back when IE6 was still somewhat relevant) and 
given that no browser supports 'binding' yet, it certainly wasn't that 
simple.  The main problems I remember were consistent application of 
margins, paddings, width, text alignment and positioning, which had to 
be combined in just the right way in different browsers to get the right 
result.  This was further compounded by the fact that the design of the 
button on steps 2 to 5 had to match the design of the real link on step 
1 as closely as possible, and given the vast differences between 
applying styles to links vs. buttons, this was a bit of a challenge to 
get right.  Unfortunately, the site has since been redesigned more 
recently and so I can't show you.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Thursday, 17 June 2010 10:35:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:10 GMT