Stripes

<stripes:button> Should Generate button Elements Rather Than input type="button" Elements

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.4.3
  • Fix Version/s: None
  • Component/s: Tag Library
  • Labels:
    None

Description

The <stripes:button> custom tag generates <input type="button">. I believe it should actually generate <button> elements.

<button> elements are easier to style (older browsers don't support selectors like input[type="submit"]).

<button> supports three types: button - which is like an <input type="button">, submit - which is like an <input type="submit"> and reset - which is like an <input type="reset">.

We use <button type="submit"> in preference to <input type="submit"> because it is easier to style buttons. This means that we can't use <stripes:submit> or <stripes:button>, which isn't a massive problem, but it would be nice to be able to use <stripes:button type="submit"> and have that generate a <button type="submit">, e.g.

<stripes:button type="submit">Ok</stripes:button>

would generate:

<button type="submit">Ok</button>

Activity

Hide
Ben Gunter added a comment - 01/Oct/07 3:48 AM

I know it's not ideal, but you can do <s:button class="button" ... /> and apply styles to input.button.

Show
Ben Gunter added a comment - 01/Oct/07 3:48 AM I know it's not ideal, but you can do <s:button class="button" ... /> and apply styles to input.button.
Hide
Walter Rumsby added a comment - 01/Oct/07 1:19 PM

<button> also gives you some additional flexibility, e.g. you can create an image button using <button type="submit"><img src="..."/></button>.

Personally, I would prefer to use <input type="submit"/> but we don't have a mandate from our product management to use default (i.e. unstyled) buttons.

This is not a major issue for us, but it would be nice to be able to generate <button> elements with a Stripes tag.

Show
Walter Rumsby added a comment - 01/Oct/07 1:19 PM <button> also gives you some additional flexibility, e.g. you can create an image button using <button type="submit"><img src="..."/></button>. Personally, I would prefer to use <input type="submit"/> but we don't have a mandate from our product management to use default (i.e. unstyled) buttons. This is not a major issue for us, but it would be nice to be able to generate <button> elements with a Stripes tag.
Hide
Chris Herron added a comment - 06/Aug/08 5:59 PM

It doesn't seem reasonable to leave this out. Using <button> is really useful for styled image buttons as Walter described. I know we can just use raw HTML, but it would be nice to have Stripes support it. Then I could have more IntelliStripes auto-completion lovin on my buttons!

Show
Chris Herron added a comment - 06/Aug/08 5:59 PM It doesn't seem reasonable to leave this out. Using <button> is really useful for styled image buttons as Walter described. I know we can just use raw HTML, but it would be nice to have Stripes support it. Then I could have more IntelliStripes auto-completion lovin on my buttons!
Hide
Marcus Kraßmann added a comment - 09/Jan/11 7:47 AM

Changing this might be useful, but keep in mind that this will break backwards compatibility for existing applications. Maybe worth for the 1.6 release?

Show
Marcus Kraßmann added a comment - 09/Jan/11 7:47 AM Changing this might be useful, but keep in mind that this will break backwards compatibility for existing applications. Maybe worth for the 1.6 release?
Hide
Walter Rumsby added a comment - 09/Jan/11 1:50 PM

Actually, there are some issues with the <button> element in Internet Explorer 6 that might mean that changing what is generated by the <stripes:*> tags isn't an attractive option - http://allinthehead.com/retro/330/coping-with-internet-explorers-mishandling-of-buttons

Looking back at this issue, if I now wanted to solve the problem I initially described I'd probably rely on a JavaScript framework, e.g. YUI 2's Button Utility - http://developer.yahoo.com/yui/button/

Show
Walter Rumsby added a comment - 09/Jan/11 1:50 PM Actually, there are some issues with the <button> element in Internet Explorer 6 that might mean that changing what is generated by the <stripes:*> tags isn't an attractive option - http://allinthehead.com/retro/330/coping-with-internet-explorers-mishandling-of-buttons Looking back at this issue, if I now wanted to solve the problem I initially described I'd probably rely on a JavaScript framework, e.g. YUI 2's Button Utility - http://developer.yahoo.com/yui/button/
Hide
Marcel van den Brink added a comment - 21/Jun/11 7:56 AM

My opinion is, that maybe it would be wise to provide a new tag for a <button> (and not use the <input> for it). But then again, how would you name it?

The comment that the <button> element has issues in IE6 really is no argument. IE6 is IMHO outdated and should be upgraded to 'real' browsers. In projects I work on I also see that IE6 is becoming a rare requirement.

Show
Marcel van den Brink added a comment - 21/Jun/11 7:56 AM My opinion is, that maybe it would be wise to provide a new tag for a <button> (and not use the <input> for it). But then again, how would you name it? The comment that the <button> element has issues in IE6 really is no argument. IE6 is IMHO outdated and should be upgraded to 'real' browsers. In projects I work on I also see that IE6 is becoming a rare requirement.
Hide
Chris Herron added a comment - 21/Jun/11 8:26 AM

Re: IE6, its relevant to note that Google is deprecating IE7 across Google Apps:
http://googleenterprise.blogspot.com/2011/06/our-plans-to-support-modern-browsers.html

Show
Chris Herron added a comment - 21/Jun/11 8:26 AM Re: IE6, its relevant to note that Google is deprecating IE7 across Google Apps: http://googleenterprise.blogspot.com/2011/06/our-plans-to-support-modern-browsers.html

People

Vote (2)
Watch (2)

Dates

  • Created:
    30/Sep/07 5:19 PM
    Updated:
    21/Jun/11 8:26 AM