Re: [orca-list] Text after <a /> is presented as a link



You need the Doctype.  It keeps Internet Explorer from using the broken
box model of IE5 (known as Quirks Mode).  Do not include the xml prologue 
before the doctype. In fact, don't put anything before the doctype... 
not even comments or spaces or newlines. Those will put IE in Quirks Mode. 
XHTML is a syntax that expects you are turning an XML file into an
HTML file.  Almost nobody does that, except within Intranets.

The "Strict" version of either doctype (whether XHTML1 or HTML4)
had an adherence to consistancy, and with the doctype in the front,
you can tell the validator what rules you want your code to be 
judged by.  Without a doctype, it must guess.

Nobody reads the xmlns attribute of the HTML element.  That's just
there for pretty looks, because the page is sent as text/html.
User agents ignore XML namespaces if they see the page as HTML.

If you would like to read more about why some of us developers stick
to HTML4.01 Strict (again, not Transitional), you may like this 
article by Dave Shea: http://mezzoblue.com/archives/2009/04/20/switched/
(and there's a link in there to Hixie's famous rant, most of which
can be argued against by simply validating pages).

XHTML might still be viable, and there is something called content
negotiation, where you serve real XHTML to smarter browsers and HTML
to IE, or within intranets where IE isn't present; however, XHTML2 was 
abandoned, and no further developement is going on with XHTML1.

What PHP developers prefer to use in their templating software is of
little consequence.  Perl template modules can put out either syntax, 
depending on what you choose.  It certainly doesn't matter that most 
of the popular WYSISYG editors such as DreamBeaver start folks out with 
XHTML Transitional doctypes (and seriously that's almost an oxymoron 
<smile>). XHTML is not much newer (specs are from 1999) and so far not going 
anywhere special.

For most of us it's just personal preference, based on which side of
the bed we crawled out of or what kinds of interesting drugs we
added to the morning coffee that day.  I do keep writing new code in
XHTML because of legacy code (original pages and templates are set as
such), but... meh.  I would say, though, that if you really want to 
write XHTML, do it knowing the pitfalls, the different rules (compared 
to HTML4), and that most browsers are seeing the code as HTML with
extra-to-be-ignored slashes at the ends of random elements. Start searching
for old posts by Hixie, Jukka Korpula, and Jeffrey Zeldman.  You can read
their old discussions and get a better idea of what's been going on lately.

If do you write real XHTML, it is rather awesome that browsers like
Firefox will give you the Yellow Screen of Death when you make a 
single syntax error (this is a Feature in my book).  Mark Pilgrim wrote
a lengthy sky-is-falling story about, XHTML gone wrong and how it would
break the internets or something, lawlz... entertaining read.

'Course now, it's all super awesome trendy new HTML5 this and HTML5 that.
No, Internet Explorer does not know what that is either, but there are plenty
of bloated javascript plugins for that <smile>.
HTML5 can be written with either syntax.

Greets,
Mallory

On Fri, Sep 03, 2010 at 04:16:51PM -0700, Steve Holmes wrote:
I'm finding this conversation increasingly interesting.  I've
undertaken a course of personal study of HTML/XHTML and PHP and was
leaning towards XHTML.  I thought XHTML was the up and coming way to
go.  I actually prefer XHTML because of its tighter structure and
adherence to consistency.  I still would like to continue to code any
future web content with XHTML structure.  I would only supply the
XMLNS parameter on the top line and not bother with the <!DOCTYP
entry.

On Fri, Sep 03, 2010 at 02:16:14PM +0200, Mallory van Achterberg wrote:
Hi Marcus,
Re the meta tag: with that alone, you cannot set the MIME type for 
the page. User agents can and will ignore meta tags and let the
server override with HTTP Headers (this is also true with the charset).  
If you really want the page to be XHTML, you'll have to set it that way 
on the server or with HTTP Headers.  
However, be aware this means Internet Explorer will not display the page, but
will ask the user to either download it or open in another application
(because while it understands XML, it does not recognise XHTML correctly).
I don't remember if Internet Explorer 9 was going to change this, but
so far it seems it won't.

For this reason, I've stopped writing any new pages in XHTML, and just
stick to HTML4.01 Strict.  If you want stricter validation from the
w3c validator (validator.w3.org), you can tell it to pretend the page is 
XHTML1.0 Strict and get useful error messages there.  This is what I use
to catch errors like my bad closing anchor tags as I couldn't for the
life of me figure out what the heck Firefox was doing <smile>.

Also, if your named anchor is supposed to be a destination for a skip link,
I've discovered a few browsers won't move the focus there with the anchor
the way you've got it written.  Internet Explorer 8 seems to want an href
attribute (I set mine to the same as the skip link's to avoid problems), 
whle Opera requires there is text content inside the anchor (but that content
can be a single space character, which works for me).

If Orca worked with webkit browsers, it would be interesting to see what
it did in the face of such an HTML error...

Greets,
Mallory 

On Fri, Sep 03, 2010 at 12:36:55PM +0200, Marcus Habermehl wrote:
Am 03.09.2010 08:57, schrieb Mallory van Achterberg:

The HTML code in that site is poorly and incorrectly written.  First,
while a construct such as <div/> might be considered valid XHTML (or
valid XML), this is only true if the document is sent as XHTML 
(application xhtml+xml for MIME type), which this page tries (with the
content meta tag) but fails (server is sending it out as text/html, which
is the only reason why this page actually works in Internet Explorer).

The meta tag content-type was written 2 times into the header. The first
one with text/html and the second one with application/xhtml+xml.

Since the page is really text/html, this  means the browser interprets the 
code as bad "tag soup" HTML.  According to the W3C specs, anchors are
not EMPTY elements like IMG and BR. Also, "name" attributes have been
deprecated for anchors in XHTML.  So whoever wrote this page wrote
it wrong and it's confusing poor stupid Firefox.  Orca can't be 
blamed.

I must be blamed. I have written this page and stoled the empty anchor
tag by an other page. After changing this <a ... /> to <a>...</a> the
page is correct presented.

Strangely enough, JAWS does not consider it a link in Firefox.  Does Orca
read "generated" source while JAWS reads straight source?

Because the page was correct presented by JAWS, I was thinking it's a
at-spi/GAIL problem.

So, does this information help?

Yes, it does. :-)

Greetings
Marcus

_______________________________________________
orca-list mailing list
orca-list gnome org
http://mail.gnome.org/mailman/listinfo/orca-list
Visit http://live.gnome.org/Orca for more information on Orca.
The manual is at http://library.gnome.org/users/gnome-access-guide/nightly/ats-2.html
The FAQ is at http://live.gnome.org/Orca/FrequentlyAskedQuestions
Netiquette Guidelines are at http://live.gnome.org/Orca/FrequentlyAskedQuestions/NetiquetteGuidelines
Log bugs and feature requests at http://bugzilla.gnome.org
Find out how to help at http://live.gnome.org/Orca/HowCanIHelp
_______________________________________________
orca-list mailing list
orca-list gnome org
http://mail.gnome.org/mailman/listinfo/orca-list
Visit http://live.gnome.org/Orca for more information on Orca.
The manual is at http://library.gnome.org/users/gnome-access-guide/nightly/ats-2.html
The FAQ is at http://live.gnome.org/Orca/FrequentlyAskedQuestions
Netiquette Guidelines are at http://live.gnome.org/Orca/FrequentlyAskedQuestions/NetiquetteGuidelines
Log bugs and feature requests at http://bugzilla.gnome.org
Find out how to help at http://live.gnome.org/Orca/HowCanIHelp



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]