Arif Posts:10
|
03/19/2007 7:44 AM |
|
Hi,
I have started on this journey of making my complex site XHTML compliant. I have found your tutorials very useful. However i can't get rid of span tag from DNN Label Edit control. I have updated it to the latest version and entered RenderAsDiv="true" value as well. This is how the html for a simple text/html module looks like:
<!-- Start_Module_1354 -->
Text/HTML Module text Here
<!-- End_Module_1354 -->
2 points to note here. First, the top span tag wraps around any DNN module e.g. Account Login therefore produces compliance errors. Secondly, the second span tag which i think is generated by the Text/HTML module shows the property RenderAsDiv="true" so obviously its not being recognised.
Any help would be greatly appreciated Regards Arif Shah |
|
|
|
|
Arif Posts:10
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
|
Arif Posts:10
|
03/20/2007 4:56 AM |
|
Thanks for the reply.
Yes, without the content the page passes validation therefore skin is XHTML compliant.
I have upgraded the webcontrols by overwriting the dlls and javascript functions. But still the content is wrapped around span. I guess that explains why RenderedAsDiv="true" appears in the html because it is not processed by the server.
I am getting XHTML errors on just about everything because of the outer span which is above the content. Not sure how to get rid of that too. |
|
|
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
03/20/2007 5:16 AM |
|
mmm it should work if you have followed those steps. - Have you downloaded the correct web controls file - the 1.5 Install version? http://www.dotnetnuke.com/LinkClick...5&mid=3438and you have changed the HtmlModule.ascx file to include: RenderAsDiv="true" You are correct that RenderAsDiv should not display if it is picking the web controls up correctly Go into the bin folder and see what version this file is: DotNetNuke.WebControls.dll
it should be 1.5.0.24279 As a test I would suggest re-downloading the zip file and re-applying the files into the bin and js folders. Then just place one Text / HTML module on a page and see what you get in the source code |
|
Lee Sykes Site Administrator Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts
Twitter: www.twitter.com/DNNCreative
|
|
|
Arif Posts:10
|
03/20/2007 10:39 AM |
|
I think i figured out the problem now.
I was getting a javascript error for script src="dnn.js" that didn't declare the type as "text/javascript". The error was coming from ClientAPI.vb file which i changed and fixed the error. However, after copying the webcontrols dll the same error appeared again so i had to rebuild the site again which in-turn changed the webcontrols dll back to version 1.4
So, now both issues are sorted apart from the outer span which is generated from Skin.VB file. Would you have any idea how to change that to a div. I managed to replace align="left" with a style tag but can't figure out anything further.
Secondly, howcome my version of DNN 4.4.1 seems to have more XHTML errors than what you encountered in your tutorial. Could it be because i updated mine from version 3??
Many Thanks for your help though it was really useful. |
|
|
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
03/20/2007 11:03 AM |
|
I am currently working on a re-skin for DNN Creative which was upgraded from v3 to 4 and it's fully XHTML compliant. - Errors could be coming from other modules on the page, most of the DNN core modules are not XHTML compliant so this can cause problems.
Regarding the outer span, is this coming from your containers? if you use the [TITLE] token it uses span - you can get around this by not placing the [TITLE] token in a div, or not using the [TITLE] token.
Also if you un-tick to use a container this will also use a span tag.
|
|
Lee Sykes Site Administrator Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts
Twitter: www.twitter.com/DNNCreative
|
|
|
Arif Posts:10
|
03/20/2007 11:38 AM |
|
You just hit the nail on the head there Lee. I need to hide the container at lots of places, specially to get rid of additional spacing.
Is there anyway to change that to div while hiding the container.
Meanwhile, since i thought i could edit the CSS properties of the outer span from skin.vb i would add the style attribute display:block on the span. Unfortunately that didn't make any difference for compliance. |
|
|
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
|
Arif Posts:10
|
03/20/2007 12:13 PM |
|
i found NoContainer.ascx and it had the span tag so just changed that to a div and all problems solved Thats one page done...abt 199 more to go. Thanks very much for you help. Regards Arif |
|
|
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
|
Arif Posts:10
|
03/22/2007 10:48 AM |
|
Following are some other errors that I encountered in my instance of DNN 4.4.1
As we know now that the outer span was coming from NoContainer.ascx...it had align="left" generating a compliance error. I found that in Skin.VB file and replaced CType(objCell, HtmlContainerControl).Attributes.Add("align", objModule.Alignment) with this: CType(objCell, HtmlContainerControl).Style(" text-align") = objModule.Alignment
I also got an error that dnn.js was declared without type="text/javascript". I found that all javascripts dynamically called from ClientAPI.vb file were in this format: RegisterClientScriptBlock(objPage, "dnn.js", "<script src=""" & ClientAPI.ScriptPath & "dnn.js""></script>") So i changed it to this: RegisterClientScriptBlock(objPage, "dnn.js", "<script language=""javascript"" type=""text/javascript"" src=""" & ClientAPI.ScriptPath & "dnn.js""></script>")
Plus there was one more error with invalid character in variable name starting with underscore (_). I found a solution for that on DNN forums by John Mitchell but unfortunately i can't find it right now. It was a change in a config file.
Thats pretty much it.
|
|
|
|
|
Arif Posts:10
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
|
Bill Wallace
Nuke Newbie Posts:4
|
03/25/2007 7:58 AM |
|
I like the good work that is going on to try and reach W3C compliance throughout DNN. It does seem to be taking a long time to get there, having brought myself reasonably up to date with various posts.
Perhaps it would be a good idea to have a test site that is skinned Strict XHTML, CSS and accessibility compliant. Test buttons could be added to test out all the validation checks, including switching off CSS, JavaScript, images, etc. Do we still have a page that is fully functional without any progressive enhancements?
The challenge would be for developers to rewrite/write their modules, upload to the test site, and test validation. If they pass, they leave their module loaded, add a few notes and expect to receive enormous praise from the community.
The apple of DNN is becoming very rosy but the core has some old decaying matter. After the initial sweetness, as you bite deeper, the taste become sour. Kill the diseases and we can fix this!
Web Standards forever. |
|
|
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
|
Bill Wallace
Nuke Newbie Posts:4
|
03/27/2007 7:26 AM |
|
Hi Lee,
I'm glad you like the test site idea and that you intend to implement it.
I have been doing a lot of work on frameworks and producing sites that satisfy all devices using web standards. If you would like to hear my ideas on the criteria I believe the core of DotNetNuke and any of its extensions should meet then please let me know.
I would also like to take this opportunity to thank you for helping (through tutorials and forum threads) me create W3C compliant pages in DNN that contain text/html or links modules. Let's hope we can extend the list of compliant modules with additional tweaks.
Billy |
|
|
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
|