Monday, April 23, 2012

How to make ASP.NET RadioButtons and CheckBoxes Section 508 Compliant?

I had a website fail a Section 508 Compliance test recently because of some radio buttons.The tool used to test was WAVE in FireFox.
The error was something like your selects have to have a label or a title attribute.
I thought cool, this will be a quick fix, I will just set the ToolTip property on the RadioButton control and be done.

I tested to verify that it worked. Then I remembered a strange behavior of these controls. When they render the output to the page, they insert a HTML input radio control inside of a HTML span control. The tooltip we provided is then used to create a title attribute on the span control and NOT on the input radio control. Therefore, the page will still fails the 508 test.

To solve the problem I just added a line of code on the page load:





This works for CheckBox controls too.
This is one of those HIDDEN properties that is there, but you may not have seen it before.
I have used it maybe 3 times in my career.

I suppose you could inherit from the base classes, and override the render events in these new classes. Then everywhere in you website, you could use these controls instead of the default RadioButtons and Checkboxes. But if you just want a quick one line fix, here it is.


Monday, February 20, 2012

Monday, May 3, 2010

Silverlight Tour Workshop

I am starting the Silverlight Tour Workshop today. http://bit.ly/4StVnO

Wednesday, November 5, 2008

Error saving when modifing tables

After I install SQL 2008 and the new SQL Server 2008 Management Studio, I started getting errors when I tried to save a table. I had just dropped an existing column.

Turns out that the following actions might require a table to be re-created:

· Adding a new column to the middle of the table

· Dropping a column

· Changing column nullability

· Changing the order of the columns

· Changing the data type of a column

When you press save, you will get the Save (Not Permitted) Dialog Box.

To change this option, on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box.



http://msdn.microsoft.com/en-us/library/bb895146.aspx

Monday, October 20, 2008

Guest Speaker at ETNUG in Knoxville

I will be the guest speaker at the East Tennessee .Net Users Group in Knoxville on Tuesday, October 28, 2008 6:00 PM @ New Horizons. I hope you can join us. I will be speaking about one of my favorite subjects: Data Access.

Tuesday, November 6, 2007

Links and Usability

Another developer told me that Amazon, Microsoft, eBay, and Apple were terrible sites. I completely disagree. Specially since Amazon and eBay have millions of users daily and I am sure some of them are not too bright. If their sites were confusing to the users they would loss business.

One of my favorite books is "Don't Make Me Think" by Steve Krug. In my opinion, the best book on Web Design and Usability. This is a “must read” for any web developer.
Steve goes back again and again to Amazon to explain why they are a great example of usability. Sometimes we need to break with OLD consistence practices to make a more usable site.

Don’t get me wrong, I'm all for consistence within a web site. Five years ago, I would not have questioned the usefulness of underlines on links. Yes, normal state, on hover, etc… ALWAYS use an underline on a link. However, web standards are changing constantly. There are advancements coming because the web culture is growing and changing. Developers need to keep up, or their sites will look as old and Windows 3.1.

It seems to me that an accepted practice for several years has been the design where "Navigation" links are expected to be on the top and/or left of the page. Often these links are encircled in someway to make them standout as "Navigation". They standout, and users have come to expect this on a page. Because the user knows they are there, the web developer does not need to make them look like every other link on the page. When you hover over them they change appearance. They may have an underline on hover over, the background color may change, and the mouse pointer changes. I like to do all of these. I was already doing all of these in my application. And I should say the site had ALREADY BEEN USED by 20 users with ZERO complaints about the navigation links. I know 20 is a small test group, but this application is intended of school professionals. They just did not need an underline to know they could click on it. Since there were no complaints, I believe it was obvious to the users that the words in the box labeled MENU were links. In the end, I added the lines in the CSS file to make the links in my menu have underlines ALWAYS because our manager wanted to error on the side of OLD link conventions. I really could not believe he and my coworker were making such a big deal out of it.

When my users are using the site, which by the way is a dynamic data entry, review, and collaboration web site meant for teachers, I want their eyes drawn to the content of the page, and not to the navigation stuff that appears on ever single page.

My real beef is against the mind set that this way is always the right way to do something.

Monday, November 5, 2007

Web Site Links Question

Jeff Atwood of Coding Horror had a cool post the Art of Hyperlinking.

I agree with almost everything he listed with regard to links.

However, it brought to mind a disagreement that I recently had with a coworker.

A coworker reviewed an application that I built and made the statement that EVERY LINK on EVERY PAGE should have an underline. I disagreed and was shot down. I was not complaining about the work. It was only a few lines in the css file to implement. However, if you look and Amazon, Microsoft, Apple, and other big name web sites that have millions of uses, they do not follow any rule that says EVERY LINK on EVERY PAGE should always have an underline. I was already using an underline on the hover over event, and changing the background color for the cell. They felt that was not enough, and was inconsistent. They said, that if you underline one link on the site, you should underline every link all the time.

So I guess my real question is what do you think of the rule that some want to make that "EVERY LINK on EVERY PAGE should have an underline"?