...

View Full Version : Bobby compliant



langer
03-07-2006, 01:05 PM
Currently to make our pages "Bobby Compliant" we have the line <?xml version="1.0" encoding="iso-8859-1"?>
This was a requirement given by our development team.

However I have been told that this causes problems. e.g. IE goes into "quirks mode"

Question is:

What exactly is the problem with IE going into quirks mode ?
What other problems does the <xml... syntax cause ?
How can I get my pages Bobby Compliant without the <xml... syntax ? I have noticed that CAST (the disabilities organisation (http://cast.org)) doesn't have the xml tag.

Any help appreciated

Cheers

gsnedders
03-07-2006, 01:32 PM
IE uses it's own (incorrect) box model in quirks mode.
None.
From what I can tell, as long as it's well-formed XML, it should be fine.

ronaldb66
03-07-2006, 01:49 PM
I can't see why the xml prolog would affect accessibility in any way; what doctype do these pages have?

langer
03-07-2006, 02:19 PM
Hi

Thanks for the replies.

The pages are HTML not XML and have the following Doc type

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>

Cheers

gsnedders
03-07-2006, 02:34 PM
XHTML is a subset of XML.

Masterslave
03-07-2006, 02:41 PM
Maybe this is correct to prevent quirks mode in IE:


$xml = " &lt;?xml version='1.0' encoding='iso-8859-1'&gt;"
echo $xml;

Is this the way to prevent quirks mode, because the first output is the doctype a the xhtml document.
Correct me if I'm wrong...:)

langer
03-07-2006, 02:55 PM
Once again thanks for the responses. However the conversation has become a little complicated for me.

Whenever I submit something to the forum, the first thing people advise is to get rid of the <xml... line because it sends IE into quirks mode.

However our development team insist that the <xml... line stays as it is required for bobby compliance

How can I have both? A page which is BC but doesnt throw IE into quirks mode?

Error 404: You say XHTML is a subset of XML. This one is beyond me. Could you explain a little more. How does this affect my situation?

Cheers

ronaldb66
03-07-2006, 03:21 PM
it is required for bobby compliance Why? What influence does the xml prolog have on accessibility? Ask them if they even serve these pages as application/xhtml+xml--which they probably are not, in which case the xml prolog is only a nuisance and a HTML 4.01 doctype would be just as appropriate.

By the way: Bobby approval is not the holy grail in accessibility checking, merely an indication; no automated process can cover everything. User testing and just common sense are more important.

brothercake
03-07-2006, 03:31 PM
However our development team insist that the <xml... line stays as it is required for bobby compliance
Simple - your team is wrong - the XML prolog has nothing to do with accessibilty at all. Even putting it aside and looking only at academic validation, the prolog is still optional.


By the way: Bobby approval is not the holy grail in accessibility checking, merely an indication; no automated process can cover everything. User testing and just common sense are more important.
Amen, in fact I'll go further - Bobby is the anti-christ of accessibility testing. Automated testing is little more than a memory refresher - to remind you of things you might have missed - it cannot actually assess accessibility; but even for that, Bobby is the worst validator out there. Cynthia Says is far more useful - http://www.contentquality.com/

But ultimately, if you're serious about accessibility there's no substitute for manual auditing - go through the guidelines manually, and ask yourself if you meet each one.

langer
03-07-2006, 04:44 PM
Thank for all the advice. I may come back to this post as and when I have additional questions.

slushy77
03-07-2006, 05:17 PM
the only problem i've had with <?xml ...?> is that it can interfere with php, but thats beyond the scope of this topic. If IE goes into quirks mode because of it(doubtful), it doesn't matter, all it means is that html will be rendered as html 4.0.1 instead of xhtml.

however if you use the following, most browsers will know what to do

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

We have to remember who we design webpages for (I dont recall a machine signing my contracts)
A good testing methodology is to get a sample group of users to review websites before they go live.

Bill Posters
03-07-2006, 05:34 PM
the only problem i've had with <?xml ...?> is that it can interfere with php, but thats beyond the scope of this topic.
I'd be interested in hearing more about it.


If IE goes into quirks mode because of it(doubtful), it doesn't matter, all it means is that html will be rendered as html 4.0.1 instead of xhtml.
I'm not quite sure that I agree with your description, but I'd say that whether or not IE is in quirks or compliant mode does matter. (Incidentally, it's not doubtful, but a matter of record that IE6/Win goes into quirks when anything comes before the DTD.)

If a layout has been designed to work in IE/Win when in compliant mode, it's likely to go tits up to some extent if quirks mode is triggered.
Boxes are likely to expand, potentially throwing divs completely out of place, thereby breaking the layout considerably - and no-one wants to be serving up a badly broken layout to users of the most widely used browser available.


For my money, 'content negotiation' is the answer.

gsnedders
03-07-2006, 05:53 PM
I'd be interested in hearing more about it.
PHP has short tags, which are enabled by default, which makes <? a valid starting tag for PHP. PHP therefore tries to parse the XML prologue which results in errors. The best solution is just to use:
<?php echo '<?xml version="1.0" encoding="iso-8859-1"?>'; ?>

Bill Posters
03-07-2006, 06:07 PM
PHP has short tags, which are enabled by default, which makes <? a valid starting tag for PHP. PHP therefore tries to parse the XML prologue which results in errors. The best solution is just to use:
<?php echo '<?xml version="1.0" encoding="iso-8859-1"?>'; ?>
That explains why I've never encountered that particular problem.
I currently only serve up the XML declaration/prologue as part of a PHP-based content negotiation script, so it's already handled as necessary.

I also tend not to use short open tags, possibly as a consequence of offering PHP advice on web dev forums.
If I use and demonstrate verbose open tags, then I know they'll work regardless of whether short open tags are enabled in the person's PHP install.

Thx for the reminder, though.

slushy77
03-07-2006, 06:56 PM
I've seen IE 5.5 break code which uses <?xml...?>, but not IE 6. which goes to show how important it is to test webpages using humans.

ronaldb66
03-08-2006, 08:35 AM
The best solution is just to use... I don't agree; the best solution would be to not use, and disable, short tags, at least that's what the experts recommend.

gsnedders
03-08-2006, 05:34 PM
I don't agree; the best solution would be to not use, and disable, short tags, at least that's what the experts recommend.
Unfortunately if you're making re-distributable code, that isn't an option.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum