Few doubts with CSS and Javascript[SOLVED]

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Few doubts with CSS and Javascript[SOLVED]

Post by raghavan20 »

1.This code works in Mozilla but not in IE; Is there a hack?

Code: Select all

ul li:hover{
	background-color:#CC6699;
}
2. Is it possible to change font or text-transform property of body tag on click of a button thru Javascript DOM?

3. General Question:
I hv now-a-days started to build sites which are XHTML compliant and W3C CSS compliant but I have not implemented WAI yet.

How many of you professionals really practise WAI in your projects? Is implementing worth enough? Will this soon be a common standard as XHTML standard has become?
Last edited by raghavan20 on Sun Oct 16, 2005 5:03 am, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

  1. I believe IE only pays attention to hover with links (anchors).
  2. tried it?
  3. for personal work, it's not absolutely important, but for commercial work it should be.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

for 2:

tried something like this, but does not work

Code: Select all

document.body.textTransform="capitalize";
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

alright I found style object to have properties to work with
so this works...

Code: Select all

document.body.style.textTransform = "capitalize";
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: Few doubts with CSS and Javascript[SOLVED]

Post by Roja »

raghavan20 wrote: 3. General Question:
I hv now-a-days started to build sites which are XHTML compliant and W3C CSS compliant but I have not implemented WAI yet.

How many of you professionals really practise WAI in your projects? Is implementing worth enough? Will this soon be a common standard as XHTML standard has become?
Since you got #1 and #2 figured out now, I'll focus on #3.

Yes, I do my best on all of my designs to meet WAI. Its really not as challenging as people make it out to be - at least it hasnt been for me.

I'll describe my development style, and maybe it will clarify how/why its easier for me.

First, I mockup a design/layout in a graphics program (The Gimp or Photoshop). This gives me 100% control visually to get the concept down. It may literally just be a bunch of scribbles, but it gives me a clear mental picture of where things will go. Then I work on reducing the number of images I use. I start by simplifying the design. If I use a solid color background, I probably won't need a background image - thats a big savings.

I continue until I think I have the majority of the page accomplished without using graphics. Then I use the program to make whatever graphics I have left to make.

Then I move to a webdesign program like NVU. In it, I create the html for the page. I make sure to make alt tags for all graphics (WAI: 1.1), and use html-compatible code as I develop - including making forms accessible (WAI: 1.1).

I avoid using tables for layout whenever possible (WAI: 5.1, 5.2). I also make sure that I use semantic markup: Have a title, headings, sub-headings (h1, h2), and so forth.

Next, I check my page in the colorblind filter test to ensure that everything can be accessed without color (WAI: 2.1).

Finally, I turn off stylesheets (WAI: 6.1) and linearize the page - which helps show me what the search engines will see. I may rearrange the placement of elements to ensure that a description is near the top of the linearized output.

By then, the page is pretty much complete. By doing those things in that order, I already accomplish virtually every P1 checklist item without trying. Then I can run it through WAI, and look for issues in P2 and P3, but generally, I already keep those items in mind when developing.

I use Firefox with the web developer plugin for all my testing, and it has single-click access to almost everything I listed above.

Honestly, the only problem I generally have with WAI is the "Accesskey" requirement, which numerous articles have shown to be more harmful than helpful.

I should mention that I suffer from accessibility issues (visual), so I'm very aware of the issue, and a loud advocate for making accessibility part of your design workflow. As a result, I may not be the typical developer in that sense.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

Thanks for the detailed steps to make pages WAI compliant.
Your long post has definitely given me the inspiration to start working on WAI hereafter.
Post Reply