[whatwg] Proposal for a link attribute to replace <a href>

Pawe? Stradomski wrote:
> W li?cie Robert O'Rourke z dnia czwartek 28 lutego 2008:
>   
>> Pawe? Stradomski wrote:
>> <div class="steps">
>> 	<input href="/basket.html" class="basket-step" value="Basket" />
>> 	<input href="/checkout.html" class="current checkout-step"
>> value="Checkout" /> <input type="submit" class="confirm-step"
>> value="Confirm" />
>> 	<input type="button" disabled="disabled" class="payment-step"
>> value="Payment" /> </div>
>>
>>
>> If I could use one (or at least fewer types) of elements it would make
>> cross-browser styling easier. 
>>     
> You're breaking element semantics here. <input>s are for form input elements - 
> text fields, checboxes etc. The above would make those inputs text fields, as 
> you didn't spcify the type. Now how can an input be a link? It's supposed to 
> accept user text, not to point to some other resource. Activating an input 
> (by clicking on it etc.) should just make it start accepting typed text, not 
> make the browser jump somewhere else.
>
> Presentation/style should follow the semantics, not the other way round.
>
> After more thinking I lean towards Krzysztof's point of view, href as global 
> attribute is a bad idea. I guess it's in the FAQ for a purpose, so EOT for me 
> (of course I'll accept and respond to off-list e-mails).
>
>   

Sorry, I should have explained that better (always in a rush to get my 
thoughts down), it was just a snippet that is actually inside a form. 
But you're right of course. Within a form wouldn't inputs with a 
type="button" be appropriate? Why do we have type="button" if it's 
completely useless without scripting?

I view a checkout process as a multi-page form so my thinking was that 
from a user-perspective clicking buttons makes something happen in the 
scope of the form and does not 'take you elsewhere' as such regardless 
of what really goes on. It could get confusing but I'd definitely find 
it useful to apply to div elements and list items.

Thanks for pointing that out,
Robert

Received on Friday, 29 February 2008 03:16:04 UTC