Accessible web coding 101

Design Forums > Web Design Forums > Web Coding & Development > Accessible web coding 101


Reply
 
LinkBack Thread Tools Display Modes
Jazajay is offline
All round nice guy
1,215 Posts
Leicester, UK
No worries, well the thing is it may be a lot of info but you wont need everything all the time, and when you start using it it's like second nature, and the benefits are huge, they don't just make sure you are legally safe.

But I'm glad you found some of it some use.



Do your bit keep children safe and report illegal content to the IWF.
ADHD or a reaction to food additives? The Hyperactive Children's Support Group
Ever wondered how to create a contact form for your site? Then follow this easy tutorial
Does your site meet the legal requirements of the DDA? Not sure then find out if it does

Last edited by Jazajay; 07-01-09 at 04:04 PM..
  Quote Post 11 Posted 07-01-09
Jazajay is offline
All round nice guy
1,215 Posts
Leicester, UK
JavaScript
Now this section can make massive improvements to your site and will be one of the areas were you are more than likely will get sued because of inaccessible web coding.

Even though like screen readers, search engines read some JavaScript they wont read all of it and if you have links that only operate with JavaScript then the search engines may not be able to, or can have difficulties, following them and thus have issues with indexing the content on those URL's.

The simple answer to writing accessible JavaScript is finish the site with no JavaScript, this is how I do it, then add JavaScript to enhance the page afterwards that way you know it works for all users first.

For example if you have a link like either of these ~

<a href="#" onclick="window.open("path/to/file.htm","windowName","listOfAttributes")">Click here to open a new window</a>

<a href="javascript:window.open("path/to/file.htm","windowName","listOfAttributes")">Click here to open a new window</a>

The problem is both will open new windows but neither would be accessible to the search engines nor a blind user.

Now to get around that you change the A tags HREF attribute to the same file you are opening and then include the new window in the ONCLICK attribute and set the link to return false. That way the new window does not load in the same window you are viewing and gives you the same effect, but accessible.

So it would look something like ~

<a href="path/to/file.htm" onclick="window.open("path/to/file.htm","windowName","listOfAttributes");return false">Click here to open a new window</a>

Now again the other main benefit is that the search engines can now get to file.htm and index it whereas before they couldn't.

The same technique can be used for any link they don't just have to open windows.

Now the other main area where there may be an issue is with submitting forms that relie on JavaScript's ONCLICK event to submit it. The way around it is either to apply the same function with in the ONKEYUP event on the button or to move the whole event to the top of the form.

On the top of the FORM tag add the ONSUBMIT event and place the same function in there. That way when screen readers who access links by keying them, rather than clicking them, will still be able to send you the information.

What I personally do is add a browser sniffer to the page then test to see if it is FireFox, Safari, IE or Opera and if it is not turn off JavaScript. Because the other area that can get a non sighted user stuck is when you dynamically add content to the page. This is because screen readers will not know where the new content gets added and it is up to the user to go back to the top of the page and go through it word by word to see if it has.

But if you make sure you build your sites with JavaScript disabled then once it is finished add it you will allow the Search Engines to access more as well as getting rid of trouble areas for screen readers at the same time.

Again hope this helps.
Jaz

Key:
Purple ~ XHTML



Do your bit keep children safe and report illegal content to the IWF.
ADHD or a reaction to food additives? The Hyperactive Children's Support Group
Ever wondered how to create a contact form for your site? Then follow this easy tutorial
Does your site meet the legal requirements of the DDA? Not sure then find out if it does

Last edited by Jazajay; 23-01-10 at 07:24 PM.. Reason: Spelling
  Quote Post 12 Posted 07-01-09
Aarlev is offline
Designer/Team DF
1,114 Posts
London, UK
Some great info there again Jaz. Maybe we could make this a sticky?



Soren Aarlev
Web & Graphic Designer
www.sorenaarlev.com
------------------------------------------------------------------------------------
  Quote Post 13 Posted 07-01-09
Greg is offline
Freelancer/Team DF
3,517 Posts
Kent, UK
Good thinking Soren, and yes great thread Jaz, I think accessibility is something that can be easily overlooked. Thread is now be a sticky



Quick ways you can help Design Forums
Make a blog post about Design Forums
Invite your friends & contacts along
  Quote Post 14 Posted 07-01-09
Jazajay is offline
All round nice guy
1,215 Posts
Leicester, UK
No worries I'll get on to adding the html table 1 tomorrow I reckon, thanks for the feedback guys.

Jaz



Do your bit keep children safe and report illegal content to the IWF.
ADHD or a reaction to food additives? The Hyperactive Children's Support Group
Ever wondered how to create a contact form for your site? Then follow this easy tutorial
Does your site meet the legal requirements of the DDA? Not sure then find out if it does
  Quote Post 15 Posted 07-01-09
tim is online now
tim
Onartis-basher
4,302 Posts
All htrsy info to know

Thanks Jaz!


Accessibility 101 is actually the title of an article in this month's Web Designer mag.

Quote:
"On any website, stylish visuals and great content can easily be negated if navigation is tricky and time consuming, or if content fails to load in the first place.

"These shortfallls are often compounded when users with accessibility challenges attempt to use pages that have not been designed or tested with them in mind.

"Many sites still fail through poor legibility, badly labelled navigation and poor layout issues that make pages hard for screen readers used by the visually impaired. Many do not take into account the large percentage of te population with colour blindness, for whom screen contrast is very important. To address thi, we need to follow accessibility best practice. It is very important to test the end-user experience of all target users, from all walks of life, in the natural environments."

Malcolm Otter, director of consultin at Keynote Sstems, a provider of internet testing and measurement services.


It later goes onto say ...

"The use of speech, variable colours and font sizes helps, but at the end of the day, a poorly laid-out site will not be easily accessible"
I never even realised this existed until recently. And people keep undermining the problems which is getting boring, because it's only them who they're making a liability.



Dr. Frappucino
  Quote Post 16 Posted 07-01-09
Jazajay is offline
All round nice guy
1,215 Posts
Leicester, UK
Ha really not a subscriber, lol.
Bet mines more intensive though, , but what ever you can read about it is got to be a good thing IMO.

Jaz



Do your bit keep children safe and report illegal content to the IWF.
ADHD or a reaction to food additives? The Hyperactive Children's Support Group
Ever wondered how to create a contact form for your site? Then follow this easy tutorial
Does your site meet the legal requirements of the DDA? Not sure then find out if it does
  Quote Post 17 Posted 07-01-09
blueocto is offline
Web Mistress haha!
306 Posts
Newcastle u/Tyne
Jaz do you not have a blog, so you can put all these gem's out for the world to see?


  Quote Post 18 Posted 07-01-09
Jazajay is offline
All round nice guy
1,215 Posts
Leicester, UK
Yeah it is called DF.



Do your bit keep children safe and report illegal content to the IWF.
ADHD or a reaction to food additives? The Hyperactive Children's Support Group
Ever wondered how to create a contact form for your site? Then follow this easy tutorial
Does your site meet the legal requirements of the DDA? Not sure then find out if it does
  Quote Post 19 Posted 07-01-09
blueocto is offline
Web Mistress haha!
306 Posts
Newcastle u/Tyne
haha, I'll make you one if you ask nicely :-P


  Quote Post 20 Posted 07-01-09
Tags: 101, accessible, coding, web
Reply

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



vBulletin® Copyright ©2000-2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0