I am using the accordion pane control and the output rendered out is falling over on validation. There is block level elements being created inside of inline elements which is against the spec. What is the reason for doing this as apposed to using a div but still have well formed HTML?
1<div id="ctl00_SampleContent_MyAccordion">The above code should out output like
2 <input type="hidden" name="ctl00$SampleContent$MyAccordion_AccordionExtender_ClientState" id="ctl00_SampleContent_MyAccordion_AccordionExtender_ClientState" value="0" />
3 <span id="ctl00_SampleContent_AccordionPane1">
4 <div>
5 <div class="accordionHeader">
6 <a href="http://links.10026.com/?link=" onclick="return false;" class="accordionLink">1. Accordion</a>
7 </div>
8 </div>
9 <div>
10 <div class="accordionContent">
11 The Accordion is a web control that allows you to provide multiple panes and display them one at a time.
12 It is like having several <a href="../CollapsiblePanel/CollapsiblePanel.aspx">CollapsiblePanels</a>
13
14 where only one can be expanded at a time. The Accordion is implemented as a web control that contains
15 AccordionPane web controls. Each AccordionPane control has a template for its Header and its Content.
16 We keep track of the selected pane so it stays visible across postbacks.
17 </div>
18 </div>
19 </span>
20</div>
1 <div id="ctl00_SampleContent_MyAccordion">2 <input type="hidden" name="ctl00$SampleContent$MyAccordion_AccordionExtender_ClientState" id="ctl00_SampleContent_MyAccordion_AccordionExtender_ClientState" value="0" />3 <div id="ctl00_SampleContent_AccordionPane1">4 <div>5 <div class="accordionHeader">6 <a href="http://links.10026.com/?link=" onclick="return false;" class="accordionLink">1. Accordion</a>7 </div>8 </div>9 <div>10 <div class="accordionContent">11 The Accordion is a web control that allows you to provide multiple panes and display them one at a time.12 It is like having several <a href="../CollapsiblePanel/CollapsiblePanel.aspx">CollapsiblePanels</a>1314 where only one can be expanded at a time. The Accordion is implemented as a web control that contains15 AccordionPane web controls. Each AccordionPane control has a template for its Header and its Content.16 We keep track of the selected pane so it stays visible across postbacks.17 </div>18 </div>19 </div>20 </div>With a complete lack of spans.Is it actually creating a problem for you?
Jonathan Allen:
Is it actually creating a problem for you?
It is not valid HTML. It is that cut and dry. To me not passing validation is the same to me as if the control had another bug and failed to work at all. The only difference between it and other bugs is that browsers have become too lax with what they should consider valid and renderable code.
I see your point but it is not a critical factor and I wouldn't classify it as a bug or anything unless it does strange stuff which I don't believe it is. At least I haven't had any troubles with it. I'd rather get something working correctly than worry about whether it follows some ideaology and then think about minor things as validity. You know, the source code is available so you are welcomed to edit it yourself until you are satisfied or you could submit an issue about it. I don't see anything happening here as it isn't the correct place.
Well it really is a shame that browsers are so lenient on incorrectly written code, and thats what it is plain and simple. Just because a browser does not fall over on it it does not mean the code is correct. Do you let other bugs just go in your logic layer just because a browser doesn't fall over on them even though it gives back an incorrect result? What if i said that 1+1=5 and I can justify that by saying that my browser still runs if I feed it some data like that?
I need to look into the code as there is some other things that the accordion pane is falling over on for me too when it comes to rendering content in the content area.
You are being silly. For all practial purposes, valid HTML is that which is accepted by the browsers that you are targeting. The spec doesn't really mean a whole lot to app developers, as no browser actually implements it 100%. Obsessing over it just wastes time.
I agree with Custa, Its adherence to standards will only improve the toolkit.
If the accordian control is outputting incorrectly formatted HTML, it should be flagged as a bug. It seems that, there are many problems with the accordion control, the causes of which are not all known. Ignoring html that fails validation seems pretty backwards to me.
But then I guess thats the difference between professionals and amateurs. Sure, if you are designing a online shopping list for your grandma, then who cares... I take pride in my work, and if I am to put my name next to any system, and proudly say that I engineered it, I would not knowingly ignore a potential problem.
-Steve
Jonathan Allen:
You are being silly. For all practial purposes, valid HTML is that which is accepted by the browsers that you are targeting. The spec doesn't really mean a whole lot to app developers, as no browser actually implements it 100%. Obsessing over it just wastes time.
That really is a poor attitude and probably the reason why I cringe whenever I'd look at somebody like your code. If you are an "app developer" maybe you should stay off the web platform and leave it to the people earning a real living in it. Those that car about having correct code. I am guessing as you claim to be an "app developer" than you probably target only IE as a platform too. Very sad.
Note this issue has been addressed and will be included in our next release (hopefully done by next week).
Open discussion and sharing different points of view are definitely some of the main purposes for the forums but please let's all make sure it's done in a respectful and professional way.
We are tracking this and will be making sure that our sample web site pages and in turn the toolkit controls are xhtml compliant.
http://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=8156
Thanx sburke. Good to see those that are putting the controls together do care. I know there was a rush to get them out but I am glad you are taking the time to go back and get them spot on.
Thanx for that. I guess everybody keeps harping about XHTML and thats what I do target but even targeting HTML it was still an issue of having block elements inside of inline ones.
I am not sure if you have seen my other post in relation to the accordion pane. I am having issues with having content inside them that extend outside of the pane with overflow: hidden; causing my flyout menus to be cut off. Is this something that you think could be fixed at all?
Cool, this has been bugging me as well.
Those that don't care about standard's compliance immeidately identifythemselves as Visual Basic developers creating intranet apps againstInternet Explorer :)
I'm PARTIALLY kidding but seriouslyguys, standards compliance is important and makes the web as a wholebetter. The more technologies that adhere to this concept thebetter, and the better and easier coding for the web, buildingbrowsers, etc. will be.
FYI, this has been fixed in the Development branch and will be included with the next Toolkit release.
I completely agree with this strong push for standards compliance. I don't care if I'm developing an IE-only intranet application, I want it to be standards compliant. Ask all the IE6-only app developers how they felt once IE7 was released and they had to rewrite all their code that was suddenly revealed to be broken.
No comments:
Post a Comment