Sounds like you’re using a copy of the default theme which does include these (HTML5) attributes.
Yeah, I am trying to learn wordpress by looking through the code of the default theme and seeing how they put together dynamic sidebars with unordered lists. Along with http://codex.wordpress.org/Styling_Lists_with_CSS .
I’m doing something wrong as this is the only validation error I am getting.
Do you suggest a different way to put together dynamic sidebars?
I’ve actually looked at other themes and none of them have this Role attribute besides the default one.
I actually ran the default theme through the validator and it gets an “attribute” connected error also. Maybe this isn’t the way I want to go.
The fault is within the default theme – not your markup. It’s a known issue that (hopefully) will be resolved when the new default theme is released in WP 3.0.
I’m actually trying to work through making my own custom site. I’m doing it locally (Xampp) and it has been funn-ish. My only validation error for my site on both CSS and my HTML has been this attribute error. Can you take a look at my multiple sidebar code below and see if what I did is passeable. All the sidebars work and look exactly how I want them to look. It’s just this “attribute error”. Any suggestions would be great. I tried various ways, but this way seemed to give me the control I wanted.
Theme Function:
[Code & CSS moderated as per the Forum Rules. Please use the pastebin]
Here is the pastebin link to my code as mentioned above.
http://wordpress.pastebin.ca/1855402
Thanks.
The function file looks fine as does the markup but it’s next to impossible to asses if a given piece of CSS is effective without seeing it in action on the site. All I can suggest is that you ensure that it’s valid and that you test the theme across as many different browsers as you can.
Thanks. I’m still working on it locally. I was trying to validate everything before going live.
I actually saw a past post of yours to another person about this. You suggested just removing the the “role” attribute wherever it might be.
I have scoured my files (I do use the default comments.php, but that’s it) and I just don’t know how this “role” attribute is showing up for my sidebar on my page.
This is straining my obsessive behavior! As I have been scouring the web for the answer to this for the last 7 hours. Very frustrating.
The only good thing is I have learned a lot of other things in the process.
Have you looked in sidebar.php?
I actually figured it out. Well, kind of, as I don’t understand the why. For whatever reason the way I had it, the “role” attribute was being put in automatically.
I actually renamed my #sidebar div to #sidecontent . Now the “role” attribute isn’t brougt over and my page validates.
As long as it works : ) .