Pages: << 1 ... 12 13 14 15 16 17 18 19 20 21 22 ... 32 >>

03/07/07

11:27:24 pm, by robertc Email , 620 words, 10110 views   en-UK
Categories: Web Develop, Front End Web Development

Unobtrusive Javascript, Opera, <body onload= and window.onload

I was working on updating the design of one of the websites at work yesterday, the design was based on our stand at a recent exhibition and I had some cunning plans with regard to animating the page with unobtrusive javascript. The 'panel' on the right of the page rotates through three different displays at a five second interval, but there is a button to pause it should you be taken by the sudden urge to examine one in more detail. When your curiosity is fully sated you can resume the animation using the continue button which has appeared, as if by magic, in place of the pause button. OK, so it's really not that impressive, but I was quite pleased with myself, all the effects get applied by the script and there are no inline event handlers, and when javascript is disabled the content of the page displays just fine.

While I was developing I kept everything all hodge-podge in the same file, HTML, CSS and javascript all together. I was dutifully testing it in IE6 and 7, Firefox and Opera as I went along, and even Konqueror after a short delay to get it compiled on the Gentoo box I have in the server room. Everything worked fine, apart from a transparency issue in Konqueror, and when it didn't I fixed it. This included an exciting excursion into the world of the IE onmouseleave and onmouseenter events and how to make the other browsers mimic that behaviour, but was all the more fun for that. But eventually I got it all working to my satisfaction in all my test browsers and started preparing it for release into the wild. My basic plan here was to split the content, presentation and behaviour into separate files, as per accepted best practice (and also because the site will end up being more than one page) and add a print stylesheet.

It ought to have been a relatively straightforward task, and really it was if I'd been thinking clearly. The problem I encountered was that, after I'd separated everything into three files my neat pause/continue content cycling stuff went haywire in Opera. Everything still worked identically in IE6/7 and Firefox, but in Opera the pause button didn't pause, the panel disappeared for ten seconds at a time and my neat fade in/out effect for the skip link stopped working. I tried lots of weird and (in retrospect) wildly improbable fixes but nothing seemed to work, in desperation I tried putting it all back into the one file but still had the same problem. In the end I gave up and went home, had some tea, then fiddled with it for another hour, but still no joy.

A night's sleep turned out to be the cure for my stupidity, here's what was causing the problem: when everything was in the same file I'd been using the onload attribute on the body element to run the javascript initialisation; when I moved everything into separate files I'd switched to attaching the init function programmatically, using a variant of Simon Willison's addLoadEvent function; while doing this I'd forgotten to remove the onload from the body element &amp;#58;&amp;#111;&amp;#111;&amp;#112;&amp;#115;&amp;#58;

The interesting thing is that this only affects Opera. In IE and Firefox the onload on the body element replaces anything which window.onload has been set to in script, in Opera it doesn't - both will get called, first the onload on the body element and then the window.onload. If you're using global variables to, for instance, keep track of the current state of your little animation, and you're not checking the state of those variables when running your initialisation code, this will really mess things up...


Tweet this!

03/03/07

01:11:16 am, by robertc Email , 160 words, 2870 views   en-UK
Categories: Linux, SuSE

Mugshot 1.1.37-1 on SuSE 10.1

Having configured my Mugshot account yesterday to link up with my various other accounts, I figured I'd try and get the stacker running on my laptop too.

My laptop is running SuSE 10.1, for which there are no official RPMs available. Celso Pinto has built some SuSE RPMs, but they're now several versions out of date, so I tried to build the latest version (1.1.37-1) using his spec file.

There were a number of bumps along the way (needed to install mozilla-xulrunner180-devel, needed to pass the correct gecko-sdk paths to configure, needed to install gnutls-devel and then wasted a couple of hours using an older version of the spec file so rpmbuild kept falling over with File must begin with "/" errors), but in the end - triumph!

Here's a SuSE i586 Mugsgot RPM (right click and save as, can't seem to get the mime type for x-redhat-package-manager working I'm afraid) and my modified spec file. Enjoy &amp;#58;&amp;#41;
Update: a newer version is available


Tweet this!

02/28/07

11:52:56 pm, by robertc Email , 1469 words, 9364 views   en-UK
Categories: Web Develop

WSG London Accessibility Meetup

With my increasing interest in accessibility issues I signed up for the WSG London Accessibility Meetup as soon as I heard about it. I can't remember anything else I've tried to learn where I've had my preconceptions (misconceptions really) shattered on such a regular basis. There were a couple of those moments in the evening's talks for me.

Three talks, so I'm having another crack at the hReview thing, this time three reviews in one post so I'm trying the include pattern (though I think I've got it a bit wrong, and I had to do a bit of hacking in b2evo to get the internal anchors to work...).

Accessible Flash from Niqui Merret, 19:00 to 19:30

Niqui started off with some justification. many web developers believe that Flash can never be accessible, and this is not true. Flash has a lot of built in support for accessibility such as access keys, labels and captions, and in addition can be used to detect the presence of a screen reader (if you're using IE on Windows...). It is also a misconception that a block of HTML content is necessarily more accessible than a Flash movie - the phrase 'a picture is worth a thousand words' can be applied here, some disabled users will have far more trouble reading a large block of text than they would assimilating an animation.

No technology is 100% accessible, but the process of making Flash as accessible as possible is the same as with any other technology - identify the barriers stopping people accessing your content and work out how to get around them. Flash has a number of built in mechanisms to help the developer overcome barriers - as previously mentioned it can communicate with screen readers and notify it of content updates, it can be keyboard driven and labels can be added which will be read out. Niqui then showed us a demo of a simple accessible Flash game she'd built, using it with a screen reader and keyboard, and showed us some other useful tricks which were possible - dynamically adjusting/inverting colours and contrast in the movie, and a simple script which allowed the movie to scale as the browser font size was changed. She also had some interesting points about the relationship between Flash and standards - there aren't going to be any standards for accessible Flash content until the 'standards people' accept Flash.

Niqui was enthusiastic about her subject matter and had excellent presentation skills, the talk was a definite eye opener in some respects, but Flash was unfortunately the thing I was least interested in so 4 out of 5.

Technorati tags for this review:    

Accessibility, what not to do by Anne McMeekin, 19:30 to 20:00

Anne's talk covered some common pitfalls in building an accessible website, I noted down some highlights:

  • Don't assume - not all disabilities are the same, some groups don't even class themselves as disabled even though they have accessibility requirements, so you can't predict how accessible your site will be to all of them. Also don't assume that disabled people won't be interested in what you have to offer.
  • Don't ignore - if people complain about the accessibility of your site then that needs to be treated as an opportunity to improve, feedback is valuable.
  • Don't forget the background - not everyone browses with a default background colour of white, if your site design depends on having black text on a white background it can look pretty horrible (and be hard to read) if a user is browsing on Windows using the high contrast theme if you don't explicitly set those colours in your stylesheet.
  • Don't waffle - cut out unnecessary text like 'click here for', don't duplicate content across alt and title attributes and the link text as it could end up getting read out three times (and don't put crucial content only in the title attribute, as it may end up not getting read at all). Also remember that the popup boxes for alt and title attributes can often obscure important content for screen magnifier users, who need to keep the mouse pointer near to what they're reading. Don't make your pages unnecessarily long as vast swathes of text will fill up the screen reader's buffer and slow everything down.
  • Don't be shy - biggest users of skip links are people with motor disabilities, not blind users, so hiding skip links and keeping them only for blind users is counter productive. Don't forget the :focus and :active pseudo classes as these are the ones which will be activated by keyboard only users.
  • Don't leave it to chance - put unique information first on the page, don't take the chance that disabled users will leave before getting to the interesting content. Put instructions before the form to which they apply. If you have help info for items on your form then put the links to that help inside the labels otherwise they may be ignored by screen readers in 'forms' mode. Put the labels in the expected places (before inputs and selects, after checkboxes and options) so that users using screen magnifiers will see them. Also remember that, when using legends with fieldsets, many screen readers will read out the legend before the label for each form field - so keep the legend short and sweet (Anne mentioned one example she'd seen which had a 38 word legend!).

The subject matter of this talk was far better aligned with my interests, but Anne was a bit soft spoken which made it difficult to hear at points, and there weren't too many practical examples, so 4 out of 5.

Technorati tags for this review:  

Web Accessibility by Mike Davies, 20:00 to 20:30

Mike's talk focussed on the business case for accessibility, and mostly related to his work in transforming the Legal and General website. His opening slide was quite impressive, he asked "What if a web agency walked into your office and promised the following things for your website re-design?":

  • 40% increase in traffic
  • Double the number of successful conversions
  • Double the revenue generated by the site
  • Get a return on investment for the re-design in five months

Although none of these were the explicit goals of the re-design, but they happened as a result of accessibility improvements.

Mike discussed some of the things which were required to get the whole project pushed through:

  • Clear responsibility and vision - the goal of accessibility was driven from the top
  • Define a role and career path for 'web Developers', don't let web pages be the thing trainees do before they move on to 'proper' development
  • Have a consistent vision for the whole website, educate the content developers to understand accessibility requirements
  • Choose a design agency which demonstrates an understanding of accessibility (assess the accessibility of websites in their portfolio, assess the accessibility of their own website, ask them to explain any shortcomings when they come in for an interview) - they chose Fortune Cookie

He also discussed the role of web standards with an anecdote from the early part of the project. One of Legal and General's web applications worked in IE but didn't work at all in Firefox, an attempt at validating the page showed several thousand errors but it turned out the main issue was a missing double quote on a single attribute. The point here is, if the page had been designed to validate from the start then an error like that would have stuck out like a sore thumb instead of being lost in a sea of other validation errors - Mike estimated this particular error cost the company approximately £20000 in lost business. One other thing Mike mentioned which stuck in my mind was that the biggest single asset in producing and accessible website was the imagination of the developer - they need to be able to imagine how differently abled people will interact with the site.

Overall this was probably the best talk of the night, there was a lot of information on the slides over and above what I discuss above including some detailed statistics, but, as the focus was on business issues, there was again a lack of practical examples, 4 out of 5.

Technorati tags for this review:  

After the three talks there was a question and answer session which was very useful, touching on some of the legal requirements (British law requires a 'best effort' from the web developer so they should attempt to work around technological deficiencies; the RNIB and other similar organisations cannot sue you for having an inaccessible website, only individuals can sue; several legal actions have already been settled out of court) as well as some specific techniques and issues which hadn't be covered in the talks - Anne was particularly good.

Overall this was an excellent evening and I learned a lot, I'll be looking out for the next WSG meetup.


Tweet this!

02/22/07

11:21:32 pm, by robertc Email , 43 words, 2247 views   en-UK
Categories: Web

15 CSS Properties You Probably Never Use (but perhaps should)

Link: http://www.seomoz.org/blog/css-properties-you-probably-never-use

In a follow on from his earlier post (5 HTML elements you probably never use), Matthew Inman at SEOmoz has posted '15 CSS Properties You Probably Never Use'. Possibly not as practically useful as the earlier post, but an opportunity to broaden your CSS horizons.


Tweet this!

02/17/07

12:48:49 am, by robertc Email , 1258 words, 5353 views   en-UK
Categories: Web Design, Web Develop, Usability & Accessibility

What is our legal exposure because of web accessibility laws?

I spent just over an hour and a half writing an email after one of the directors where I work asked this question. It occurs to me that most of what I said in the email had some general applicability and there may be other people out there getting asked similar questions. It may be useful for all of us to compare notes, so I've edited all the company specific information out and you'll find the bulk of my response below. I'm interested in opinions on what I've said, what I could have said differently (or what I've got wrong!), other things I could have said and answers you may have given to the same question. Context: I work for a software company which provides a web interface as a secondary interface to a desktop application.

This entire response should be prefaced with the fact that I am not a lawyer and am therefore not qualified to determine legal risk. For definitive answers of our legal exposure we should consult a lawyer.

In my opinion we are unlikely to get sued directly unless we've explicitly promised in a contract or tender that we meet accessibility requirements. That's not to say that, should one of our clients get sued, we wouldn't find the costs passed on to us, but we are somewhat shielded as we are not offering a public service directly.

A number of our clients would be in a position to get sued, basically anything which:

  • provides a service to an employee through a website; or
  • provides a service to the public on a website; or
  • has anything to do with the government

is a viable target for legislation that currently exists in the UK. Note that ignorance of the law is not usually considered an excuse in this area.

In practical terms, it seems legal action is unlikely. Even since the government introduced the new guidelines in 2004, new websites commissioned by the government have not met those requirements - there was something of a fuss about at least one major project (see Blether: The DTI Responds for some info, and the resulting petition). For ultimate irony, consider that many of the legal accessibility documents provided by governments that I linked to in the email below are themselves in contravention of the web accessibility guidelines because they're only available in PDF or Word format... It seems that, even though the government has decided to make accessibility a legal requirement of any government web project they don't have anyone with the technical skills to asses whether or not the requirement has been met. In addition, comments I've read from representatives of major disability organisations in the UK indicate that, currently, those organisations would rather work with web site producers to improve accessibility rather than initiate confrontational legal action. However, it may be a case of waiting for the floodgates to open, the clients themselves are relatively unlikely to complain unless they face outside pressure. Any major UK government related projects or probably any project involving web in Australia, where we would either have agreed to supply a web application meeting accessibility requirements or it would have been an implied requirement, we may have some exposure.

From a technical standpoint, I only really started paying serious attention to this in the last six months. It is something of a technical minefield because, unlike other web standards, there aren't so many hard and fast rules and a lot of it comes down to the practicalities of popular screen reading software. Although there are standards, screen readers have to deal with the web as it is rather than as it ought to be. There are also a lot of folk on the web who are just parroting what they've heard before without actually having any practical understanding of the issues facing disabled users, these people often fall into the trap of assuming "standards compliance = accessibility" (myself included). It's also important to remember that disability does not equal blindness, there is a tendency to focus on blind users but there are also other vision related issues (eg colour blindness, partially sighted) as well as the wider world of disability (people with motor control issues clicking on small buttons).

One of the main problems from the point of view of our development process is that we are often trying to achieve a level of interactivity and presentation similar to desktop software under severe time pressure, and none of the people involved have much understanding of accessibility issues, so we usually take the easy way out. The lack of knowledge hurts us across the board, because at no point is there anyone who can assess the issues: client facing staff are in no position to evaluate the accessibility of client proposals and can land us with requirements which are always going to be problematic; sales staff focus on stuff which 'looks impressive' and that stuff often ends up in the product; developers are unable to meet accessibility requirements either because they're not aware of them or because there is time pressure to have an item produced; testers cannot test accessibility because they have no knowledge or experience in this area. Anyway, the result is that we have some issues with checkpoint 6.3 and checkpoint 6.4 of the WCAG (Web Content Accessibility Guidelines, which are the basis of most current legislation).

Here is a potted tour of our current web offerings and their level of accessibility: [Summary of our web products and how much effort it would take to get them up to full compliance went here]

So what can we do?

This was from an earlier email I sent which led to the question, I refer to it above so I include it for context:

Some further references in relation to the Accessibility stuff:

  1. Australia was the first country in the world where a legal case was brought and won against an inaccessible website (the Sydney Olympics site)
  2. Here are some guidelines to the Australian law, the key thing to note here is that, unlike some other countries, the focus is on all web sites rather than just government information
  3. Guidelines from an Australian government website
  4. This article discusses UK legislation which came into effect in 2004
  5. Here are the UK Government guidelines (ie. for government websites)
  6. The US Americans with Disability Act
  7. Some discussion of the US ADA
  8. US Section 508 summary
  9. Irish Disability Act
  10. Discussion of the recent Dutch Web Accessibility Laws, likely to be taken as a model for future European legislation

Tweet this!

02/16/07

02:12:21 pm, by robertc Email , 35 words, 3480 views   en-UK
Categories: Web

Accessibility: left: -9999px versus display:none

Link: http://www.nickfitz.co.uk/2007/02/14/why-left-9999px-is-better-for-accessibility-than-display-none/

The most complete technical description I've read so far about why 'left: -9999px' is usually better for screen readers than 'display: none' in IE. It's always better to understand why you're doing what you're doing...


Tweet this!

02/13/07

01:47:52 pm, by robertc Email , 43 words, 1944 views   en-UK
Categories: Web

Practical Use for Those Rarely Used HTML Tags

Link: http://willcode4beer.com/design.jsp?set=littleUsedHtml

Some nice examples of what can be done with those HTML elements you never use. The main thing I wasn't aware of was the cite attribute on the blockquote tag, I'll be updating some of my pages with that in the near future.


Tweet this!

02/10/07

12:53:45 am, by robertc Email , 38 words, 3469 views   en-UK
Categories: Programming, Web

WebDD07: Alternative Perspectives

Link: http://webdd.backnetwork.com/feeds/

Some alternative opinions on WebDD, from people who went to at least some of the same talks I did, culled from the excellent Backnetwork site for the event:


Tweet this!

02/09/07

10:56:29 pm, by robertc Email , 552 words, 3271 views   en-UK
Categories: Web Develop, Usability & Accessibility, Front End Web Development

WebDD07: Unobtrusive Javascript with Rails (Dave Verwer)

Review: Unobtrusive Javascript with Rails at WebDD Conference 07 15:40 to 16:40

This was the final talk of the day and I was flagging a bit, I'd originally planned to go to Scott Guthrie's WPFe talk, but that was packed out and, following Dave's stellar performance in the previous talk I was interested to see what he had to say on a subject I was a bit more familiar with.

The talk started with a little motivation, why would you want to make your javascript unobtrusive? The main benefits, if your sites are built to work with or without javascript, are:

  • Accessibility - if no part of your site depends on javascript to provide the content then it will naturally be more accessible
  • Mobile Browsing - an increasingly more significant market segment, but most mobile browsers don't handle javascript very well if at all
  • SEO - search engine spiders don't pay any attention to javascript and won't see any content generated by it

Aside from the 'big three', Dave also mentioned the Dutch web accessibility law, which mandates unobtrusive javascript (and will possibly be a model for new laws in other countries), and that separating behaviour from content is just good practice, in the same way as seperating design from content with CSS is.

Next Dave showed us an example of 'good' and 'bad' web applications. We saw Google Maps in which all the basic functionality is available even if javascript is turned off in the browser, and Zoho Planner which is impossible to even log in to without javascript. Then we moved on to some common issues:

  • no target="_blank" - this assumes your user is browsing in a windowed environment
  • no href="#" - this link conveys no useful information if javascript is not enabled
  • no onclick="... - this assumes javascript is available, better to make sure the default functionality works and add event handlers with javascript instead

Finally Dave showed us a demonstration of developing a web app using unobtrusive techniques. He showed us the LowPro, an extension of Prototype to make it easier to implement unobtrusive scripting. This is part of the UJS Rails Plugin which extends the Ajax helpers available in Rails to be unobtrusive, making it all very easy. One of the key points from the demo was that because everything needs to work without javascript, anything which a user without javascript is going to need should be in the HTML. If some of those items aren't needed when the page has been Ajaxified (submit buttons on auto-completing search fields for instance) then they can be hidden with javascript, but it is impossible to have javascript add things in when it's disabled.

In conclusion, Dave recommended that we develop our sites so they work without javascript and then add the script in afterwards. He also recommended that, as we were considering adding an Ajax effect to our page, we asked ourselves three questions:

  • Do we really need it?
  • Will my links still work?
  • Does this break the back button?

Another great talk from Dave with much useful advice, 5 out of 5. I must admit to doing a lot of the href="#" stuff in my daily work as a sort of reflex action, it's a habit I should get out of!

Technorati tags for this review:    

Tweet this!

02/07/07

04:53:00 pm, by robertc Email , 398 words, 4900 views   en-UK
Categories: Web Develop, Server Side Web Development

WebDD07: Ruby On Rails for .NET Developers (Dave Verwer)

Review: Ruby On Rails for .NET Developers at WebDD Conference 07 14:30 to 15:30

After a brief spell writing a Ruby on Rails app last summer I always meant to do more stuff with it, but somehow I never got around to it. I was hoping this talk would re-ignite my enthusiasm and give me some good pointers.

Dave started off with some general background for the benefit of the .Net crowd, positioning C#/VB as comparable with Ruby and ASP.Net as Rails equivalent in the Microsoft world. He then moved on to an overview of Ruby:

  • Ruby is Object Oriented - a lot of languages claim to be, but not many are as aggressively object oriented as Ruby, even null is an object
  • Ruby is Readable - there were some good examples: 2.weeks.from_now.utc for the date two weeks from today; punctuation for tests as in x.null?; punctuation for destructive and non-destructive methods as in arr.sort compared to arr.sort!
  • Ruby is Dynamic - and this is taken full advantage of in Rails, there were some more examples using method_missing and the Linguistics add on, which extends built in objects

Next we moved on to Rails, and after some general discussion of convention over configuration the bulk of the presentation was a live demonstration of building a web application. The eye opening part of this for me was that Dave approached this in a completely different way to how I'd previously done it (in my admittedly limited experience). He started by defining his model and then adding fields using Rake migrations. I'd never paid any attention to Rake before but it looks very useful once you know what to do with it, basically you define your database upgrades and downgrades in Ruby so then it's easy to roll databases backwards and forwards.

The talk finished up with some references to how Microsoft is 'borrowing' some of the ideas in Rails, LINQ being quite similar to ActiveRecord and BLINQ performing similar tasks to the Rails scaffolding.

I really enjoyed this talk, what's not really coming across in my dry description of the talk above is what engaging presenter Dave Verwer really is, if you have a chance to go see him present I can highly recommend it. Overall this was my favourite talk of the day, 5 out of 5.

Technorati tags for this review:    

Tweet this!

02/06/07

11:48:42 pm, by robertc Email , 427 words, 4086 views   en-UK
Categories: Web Design, Web Develop, Usability & Accessibility, Server Side Web Development

WebDD07: Quick and dirty Usability tests (Zhivko Dimitrov)

Review: Quick and dirty Usability tests - one week, no budget, and no usability facility at WebDD Conference 07 12:00 to 13:00

I got "Don't make me think" for Xmas and so I've become quite interested in the concept of cheap usability testing, I was looking for this talk to give me a fresh perspective on what I'd read.

Zhivko started off with a short introduction on what usability is (ease of use, user efficiency, user satisfaction) and why it's important. Increased user satisfaction leads to:

  • Increased sales
  • Decreased development costs (more testing means less fire fighting)
  • Improved brand image
  • Improved user productivity (ie. when using internal applications)

The talk then moved to comparing remote testing (screen sharing over the internet) with 'traditional' testing methods (with usability labs and all the paraphernalia). Remote testing gives you:

  • A realistic context of use - you're testing users in a 'real life' environment, where they're more comfortable
  • Better geographic representation - with traditional methods it's very expensive to test outside the area where your office is located
  • Access to professionals - if you're selling to a certain market, such as software developers, you might not be able to persuade them to travel to your lab
  • Lack of non-verbal signals - this is a disadvantage, you don't see the non-verbal cues that indicate users are getting frustrated and so have to depend on what they're telling you

Zhivko discussed some research which demonstrated that, despite being much cheaper than traditional usability testing the results gained with remote testing is at least as effective.

The final part of the talk walked through the process for running usability tests at Telerik, here's a summary:

  • Define Objectives & Target Audience
  • Set up Test Scenario
  • Recruit Test Users
  • Carry out Tests
  • Analyze Findings
  • Design Report & Brief Stakeholders

This was littered with practical advice, such as good software to use (GoToMeeting, Camtasia), what sort of compensation to offer to ensure enough respondents (a little bit more than your target group's average hourly rate), how often to use the same testers (no more than twice a year) and even how to avoid putting testers under unnecessary time pressure (don't tell them in advance how many tasks there are).

An excellent talk, just the sort of thing I was looking for with all sorts of useful tips. The only problem I had was reading the slides off the TV screen (I was unfortunately right at the back) and sometimes hearing what Zhivko was saying (probably the being at the back thing again), 4 out of 5.

Technorati tags for this review:    

Tweet this!

<< 1 ... 12 13 14 15 16 17 18 19 20 21 22 ... 32 >>