Last post Oct 09, 2011 02:09 PM by Careed
Jun 06, 2010 05:39 PM|Adam Kane|LINK
In the context of the Visual Studio 2010, ASP.NET 4.0, C#, .NET, ASP.NET Web Application project template (not the MVC one):
What is the significance of "hideSkiplink" css class?
In other words, there is clearly some meaning in the name, but I'm not sure what it is. Logically it sounds like this is css to style a hidden skip link. Hmmm.... that does't actually make sense. Does anyone know the reason that that particular name was
chosen? What is the purpose of this CSS class in the sample. Given that it's in the default template, I'm guessing some thought was put into it and it is an example of some sort of best practice, but I don't know what it is. I could ignore and just go on
with things, but I would like to understand its purpose.
<div class="clear hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Simulations"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Companies"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="People"/>
asp.net vs2010 .net4
Jun 06, 2010 09:07 PM|Careed|LINK
For accessibility considerations, you want to include skip link functionality within your navigation which is what you are seeing in your code. The hideSkiplink class is generally ignored by a normal web viewer, but when using a screen reader by someone
who is visually impaired, then the hideSkiplink class would come to action allowing for the screen reader to skip the nvaigation links and go directly to the main content of the web page. Thus, you are using this to ensure that your web page/site is compliant
with various web accessibility guidelines.
Oct 07, 2011 06:36 AM|hc1|LINK
I still do not understand. How does a background-color of #3a4f63 and width of 100% aid in the skipping of links?
Please excuse me if this is a dumb question.
Oct 07, 2011 02:25 PM|Careed|LINK
It doesn't. Note that there are two classes in the div link. I would believe that you need to see what is in the clear class first before you understand how the hideSkipLink class works.
Oct 08, 2011 04:02 PM|hc1|LINK
Oct 09, 2011 02:09 PM|Careed|LINK
The purpose of the hideSkipLink class is to make it invisible in the browser.