Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: validation errors  (Read 8456 times)

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
validation errors
« on: November 05, 2006, 01:03:35 AM »

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.fiddlenfolk.com%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&verbose=1

above link shows my site put thru' a validator.
Could someone explain this error please, and what to to to fix?

and the the css.
I get warnings (not errors)
Quote
* Line : 15 (Level : 1) You have no color with your background-color : #logo
    * Line : 78 (Level : 1) You have no color with your background-color : .colour1
    * Line : 79 (Level : 1) You have no color with your background-color : .colour2
    * Line : 80 (Level : 1) You have no color with your background-color : .colour3
    * Line : 81 (Level : 1) You have no color with your background-color : .colour4
    * Line : 84 (Level : 1) You have no color with your background-color : #insert
relevant css
Code: [Select]
#logo { float: left;position:relative; margin: 0 0 0 -4em;height:100px;width:335px; border: 5px #000; background: #ffffff url('layoutimages/logo.png');}
.colour1 {background:#ffeeee;padding:.3em;}
.colour2 {background-color:#ffddff;padding:.3em; }
.colour3 {background-color:#eeffdd;padding:.3em; }
.colour4 {background-color:#ddffee;padding:.3em; }
#insert {background-color:#dfe; padding:.3em; margin:0em .5em .5em .5em; height: auto; width: 10em; float: right; }
Logged
Of all the things I have lost, it is my mind that I miss the most.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
validation errors
« Reply #1 on: November 05, 2006, 02:26:31 AM »

Quote
508 Standards, Section 1194.22
A. 508 Standards, Section 1194.22, (a) A text equivalent for every non-text element shall be provided (e.g., via "alt", "longdesc", or in element content).

     * Rule: 1.1.2 - All INPUT elements are required to contain the alt attribute or use a LABEL.
          o Warning - INPUT Element, of Type TEXT, found at Line: 26, Column: 5 contains a non-empty 'value' attribute. This is a practice referred to as "self-labeling." Self-Labeling is argued to be accessible under Priority One or Section 508 guidelines/standards. We recommend using a Label as the Preferred method or the use of an 'alt' attribute to make this element accessible.
As I haven't fiddled with that part of snews, I'd like to know what is the correct way of doing this to avoid errors.

Line 26
Quote

Logged
Of all the things I have lost, it is my mind that I miss the most.

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
validation errors
« Reply #2 on: November 05, 2006, 05:29:30 AM »

Well, sir. The first validation thingy-ma-jig appears because the CSS Validator o'er at W3C spits and coughs at us foo's that consider putting text color in some separate class or id declarations and not entering a text color in the enveloping style a useful thing **(wha'? The text color is defined in the body ferchrissakes, whatchuwant! foo...)**. Simply put, the validator doesn't like that you have styles with background-color in them, but no color (as in text-color). My take on it is this: unless the error is severe, and this one isn't, then screw the CSS Validator. HTML validation and WCAG/Section 508 validation are far more important than CSS Validation. imho.

Second question: um, off the top of my head, add a label statement to the search form
Quote

<label for "search_query"><input type ... yada yada yada ...Keywords';" />

Or something to that effect. As the validator says:
Quote from: Cynthia
* Rule: 1.1.2 - All INPUT elements are required to contain the alt attribute or use a LABEL.
Did that make things clearer or have I simply obfuscated matters more profusely?
;D
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
validation errors
« Reply #3 on: November 05, 2006, 05:42:40 AM »

Quote from: agentsmith
Well, sir. The first validation thingy-ma-jig appears because the CSS Validator o'er at W3C spits and coughs at us foo's that consider putting text color in some separate class or id declarations and not entering a text color in the enveloping style a useful thing **(wha'? The text color is defined in the body ferchrissakes, whatchuwant! foo...)**. Simply put, the validator doesn't like that you have styles with background-color in them, but no color (as in text-color). My take on it is this: unless the error is severe, and this one isn't, then screw the CSS Validator. HTML validation and WCAG/Section 508 validation are far more important than CSS Validation. imho.
so, if I declared a text color for those I have altered background color of, then it might be sweet...

It sort of makes sense I suppose. Both the background and text colors

Quote from: agentsmith
Second question: um, off the top of my head, add a label statement to the search form
Quote

<label for "search_query"><input type ... yada yada yada ...Keywords';" />

Or something to that effect. As the validator says:
Quote from: Cynthia
* Rule: 1.1.2 - All INPUT elements are required to contain the alt attribute or use a LABEL.
Did that make things clearer or have I simply obfuscated matters more profusely?
;D
So that is then an error with snewsRC3, as I don't think I even touched the search area... except to drop the min character level to 3.


Off to try .
Logged
Of all the things I have lost, it is my mind that I miss the most.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
validation errors
« Reply #4 on: November 05, 2006, 06:33:59 AM »

ok, the color issue is resolve... I didn't have color:#[whatever] in the body.  :rolleyes:

The other however has me beat.
The code for the search form
Quote
// SEARCH FORM
function searchform() { ?>
    =| Look, nothing here =|
   


   


   
the output in validator. Where did the red bit come from?
Quote
Output on livesite ( - view source-)... and now where did it go?
Quote
Logged
Of all the things I have lost, it is my mind that I miss the most.

Armen

  • Sr. Member
  • ****
  • Karma: 41
  • Posts: 338
    • http://www.funnydays.ru
validation errors
« Reply #5 on: November 05, 2006, 09:12:36 AM »

If you get background errors in classes where you don't want to have background color at all just use
Code: [Select]
background: inheritAnd voia. Your css validates =)
Logged
Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
validation errors
« Reply #6 on: November 05, 2006, 01:51:06 PM »

Quote from: SerpantiN
If you get background errors in classes where you don't want to have background color at all just use
Code: [Select]
background: inheritAnd voia. Your css validates =)
That is something I will keep in mind for the future.
thx S

Butnow  I would like to know where the validator is pulling that red line of code from.
I can't see anything in the snews code that would be generating, and injecting it....
Logged
Of all the things I have lost, it is my mind that I miss the most.

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
validation errors
« Reply #7 on: November 05, 2006, 02:27:32 PM »

The validator prints that in order to keep track of the millions and millions of validation sessions it has to deal with each day, I think. Something to that effect. I think you can ignore that particular line as it doesn't affect the validation itself.

And, if I may, I'd suggest using "background: transparent" instead of "inherit" because "inherit" does not mean "no background", it means "use the same background (color or image or both) as the parent item" -- which can produce some really funky results and not at all the one you'd expect. "Transparent" does mean basically "no color or image". The CSS validator in its divine blindness doesn't like it however. But as a conscious choice, "transparent" would be better imho.
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
validation errors
« Reply #8 on: November 05, 2006, 02:47:23 PM »

Quote from: agentsmith
think you can ignore that particular line as it doesn't affect the validation itself.
I think that is the very line that is throwing the validator off.
Logged
Of all the things I have lost, it is my mind that I miss the most.

webviridae

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
validation errors
« Reply #9 on: November 09, 2006, 04:38:52 PM »

imho I tried background:transparent but the warning is still there. Not yet try background:inherit.

Anyhow you can check out the discussion on CSS validation at

http://css-discuss.incutio.com/?page=CodeValidation

It says

" In the case of colors and background colors, it can be dangerous to specify one without the other. Let's say, for example, that you have specified a white background color, but have not specified a text color. If the user is vision impaired, they may have set a user style sheet or other preference to display white text on a black background. However, your white background may override their background declaration (depending on how the various styles are declared), and the user will be left with their white text on your white background, making the content of the page invisible. So it is a good idea to go back and check. Frequently, color warnings appear in places where a given element will allow the background from a different element in the document to "shine through", thus in effect taking on the background of that other element. It may often be relatively safe to leave these, but you will need to review your page and make your own judgement for each instance. "
Logged

webviridae

  • Newbie
  • *
  • Karma: 0
  • Posts: 3
validation errors
« Reply #10 on: November 09, 2006, 04:44:53 PM »

Another thing is that some say

"Be careful using the "background-color:transparent" value with Netscape - it sometimes translates that as black (#000 or rgb(0%,0%,0%))."

Source at:

http://webdesign.about.com/od/styleproperties/p/blspbgcolor.htm

Just to share with you
 :)
Logged

marek

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 66
    • http://www.design4.ltd.pl/
validation errors
« Reply #11 on: December 08, 2006, 03:04:29 PM »

Quote from: philmoz
ok, the color issue is resolve... I didn't have color:#[whatever] in the body.  :rolleyes:

The other however has me beat.
The code for the search form
Quote
// SEARCH FORM
function searchform() { ?>
   
the output in validator. Where did the red bit come from?
Quote
Output on livesite ( - view source-)... and now where did it go?
Quote
Find in php.ini file this line:
session.use_trans_sid = 1
and set to:
session.use_trans_sid = 0  

or

in index.php add this line:
ini_set('session.use_trans_sid', false);

or

put new php.ini file with session.use_trans_sid = 0  in snews directory  

and that's all ;)
Logged
4th-design.com  |  www.design4.ltd.pl
xhtml and css templates for sNews
Sometimes I have something to say ;)