Re: [WSG] Browsers as copilers (was) Barclays standards redesign

2005-09-08 Thread Anders Ringqvist
Well Fx already do this to some extent. If you go strict strict, yes 
that´s two 'strict' ;-)


Serving not well-formed xhtml as application/xml+xhtml to Fx will get 
you attention.


Regards,
Anders Ringqvist

Chris Taylor wrote:

Exactly. I was actually thinking the other day, browsers 
should be more like compilers... they should refuse to parse 
incorrect code. Then the enforcement would be on the output 
end, too.



Perhaps some clever person could write a Firefox extension that does
this - if Chris Pederick is on this list maybe he wants to add this as
an option to his excellent Web Developer Toolbar? Or perhaps it could be
added as a mode for the FirefoxTIDY extension?

Screenshots of a browser displaying (X)HTML errors in the same manner
that a compiler does may get the message across that valid markup is
important to those that make the decisions about such things. I'd
certainly find it useful.

Chris
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
**


**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
**



Re: [WSG] attribute selectors question

2005-08-17 Thread Anders Ringqvist

Thierry Koblentz wrote:


Drake, Ted C.  wrote:


Hi All

I have a quick question. I don't seem to be running on all cylinders
and I can't remember how to write the css that would look for a link
that has .pdf in the href.
A [href???.pdf]...



If you use type="application/pdf" in your anchor, I think you can go with:
A[type="application/pdf"]

Thierry | www.TJKDesign.com


Which is considered much better then looking for file prefix as it don´t 
have to be 'pdf'. As I say in the thread 'accessibility - opening new 
windows philosophy' you could have a CGI/PHP/ASP/WHatever script 
generate PDFs for you. Then the file prefix solution will crack. Of 
course, this kind of 'advanced' CSS will only work in modern browsers, 
but that you already know I guess ;-)


Regards,
/Anders
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
**



Re: [WSG] accessibility - opening new windows philosophy

2005-08-16 Thread Anders Ringqvist

Jeremy Keith wrote:

Ted Drake wrote:

Jeremy Keith recently spoke about using the class in the link to  
target a javascript to add the behavior, leaving a nice, clean link.



In the case of PDFs opening in a new window, you might not even need  to 
add a class. You could write a function that looks for the file  
extension .pdf in the href attribute and open that link in a new  
window. Something like this:


function preparePDFlinks() {
if (!document.getElementsByTagName);
var lnks = document.getElementsByTagName("a");
for (var i=0; i

One should consider using the native type attribute on the anchor 
element as in:


TPS Report

this cause theoretical you could have a CGI/PHP/ASP/FooBar-script 
generate the PDF for you.


TPS Report

On the main subject of this thread I am as many here seems to be not 
really really sure what is best-practice. Do there exist a 
'best-practice' for a thing like this? As someone pointed out already it 
depends much upon the user base one have. I doubt the users of for 
example computerubergeek.com would appreciate if you forced new windows. 
On the other hand... A big shop whose main user group consist of 
computer illiterates I agree that a new window approach is better as 
many of these users expects this behaviour.


Can we make a silver bullet?

If you have members only site you could pretty easy implement user 
settings like:


--- 8< -

Web application settings


Here you can control how the web application (this site, example.com) 
should response to your actions when you interact (click on links etc.) 
with it. Remember that these settings will only work if your browser 
supports JavaScript and it´s activated.


[ ] Never ever (I mean it) open any[1] links in new windows (supercedes 
all other settings).

[x] Open non web documents[2] in new window.
[x] Trust default beaviour on links.

... and so on...

--- 8< -

[1] We have a small disclaimer telling that we can´t effect external 
links that come from a different domain and that are loaded inside an 
iframe for example. The actual text is longer but you get it.
[2] The text 'non web documents' is a link navigating to a list that 
lists(!) documents like Excel, Word, PDF etc.


Of course you could implement this even for a public site putting your 
trust in cookies but you all know the impact on this.


I have recently been experimenting with a left-click context menu for 
what I call 'advanced' links a.k.a. multi-choice-links (havn´t decided 
what name feels best). What 'advanced' links is is left upon the 
behaviour developer (JavaScript developer) to decide but the idea popped 
to my head when it became clear that my standard way of defining links 
to non web resources:


TPS Report class="Download">(type="application/pdf">download)


would become rather messy if I also added a 'open in new window'-link. 
So now I have a new choice under 'Web application settings':


--- 8< -
[ ] Activate web application context menu on 'advanced' links[3].
--- 8< -

[3] Here again is a link leading to 'our' definition of 'advanced' links.

Conclusion is that your wab application should grow as your users grow. 
Newbies to the internet and/or your site should feel comfortable and the 
web app should adhere to the 'least surprise respond'-philosophy. It 
should also be able to live up to the challenges that the more advanced 
users set out.


Well, this is only my ideas on the subject =)

Live long and prosperous
/Anders
**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
**