Custom Master Pages (and CSS)

The out-of-the-box SharePoint master pages are by no means standards-compliant, so uAKS strives to include XHTML-compliant master pages. Unfortunately, full XHTML compliance doesn't seem to be very achievable, so our intent is to continually drive towards fully XHTML-compliant master pages, yet publish them with an HTML doctype. The following master pages were included in the original AKS solution and have been adopted as part of uAKS.
  • uaks_blackband.master
  • uaks_blacksinglelevel.master
  • uaks_blackvertical.master
  • uaks_blueband.master
  • uaks_blueglassband.master
  • uaks_bluetabs.master
  • uaks_bluevertical.master
  • uaks_orangesinglelevel.master
While we will continue to support these master pages, we are not actively working on them. If you run into any issues, please let us know. Moving forward, we plan to focus our efforts on an accessible version of the Default Master Page. This is planned to be part of 0.3 - Accessible by Default(.master).

Aside from the standard XHTML compliance changes, like self-closing tags, the following modifications were made to each master page.
  • Added XHTML 1.0 strict doctype
  • Replaced default site actions menu with publishing site actions menu
  • Custom CSS
NOTE: In 0.3 - Accessible by Default(.master), we renamed all files to "uaks" to ensure there are no conflicts with the original AKS.

XHTML 1.0 Strict DocType

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

NOTE: This change was only made to validate XHTML compliance. Prior to release, each master page was changed to use an HTML transitional doctype.

Replace Default Site Actions Menu

Replacing the default SiteActionMenu server control with the PublishingActionMenu user control removed unnecessary HTML in publishing pages.
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" 
    Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="PublishingSiteAction" TagName="SiteActionMenu" src="~/_controltemplates/PublishingActionMenu.ascx" %>

<SharePoint:SPSecurityTrimmedControl runat="server" PermissionsString="AddAndCustomizePages">
  <PublishingSiteAction:SiteActionMenu runat="server"/>
</SharePoint:SPSecurityTrimmedControl>
NOTE: This is a trimmed-down version of the change. For the full code, refer to the source code.
NOTE: This change was only made to the publishing master pages. The default.master does not include this.

Custom CSS

As with any web design effort, we have custom CSS files that go along with our master pages. Microsoft separated CSS rules into separate files to allow them to reuse files in different master pages. As this simplifies the overall solution, we've decided to follow suit. The following CSS files are included with uAKS.
  • uaks_band.css
  • uaksbandblackband.css
  • uaksbandblacksinglelevel.css
  • uaksbandblackvertical.css
  • uaksbandblueband.css
  • uaksbandblueglassband.css
  • uaksbandbluetabs.css
  • uaksbandbluevertical.css
  • uaksbandorangesinglelevel.css
  • uaks_blacksinglelevel.css
  • uaks_calendar.css
  • uaks_controls.css
  • uaks_core.css
  • uaks_datepicker.css
  • uaks_ewrdefault.css
  • uaks_htmleditorcustomstyles.css
  • uaks_htmleditortableformats.css
  • uaks_menu.css
  • uaks_orangesinglelevel.css
  • uaks_owsnocr.css
  • uaks_pagelayouts.css
  • uaks_portal.css
  • uaks_singlelevel.css
  • uaks_sitemanagercustomstyles.css
  • uaks_tabs.css
  • uaks_vertical.css
  • uakszz1black.css
  • uakszz1blackbackground.css
  • uakszz1blue.css
  • uakszz1blueglass.css
  • uakszz1orange.css
  • uakszz2editmode.css
NOTE: In 0.3 - Accessible by Default(.master), we renamed all files to "uaks" to ensure there are no conflicts with the original AKS.

Validation

The following validators were used to validate the markup.
  1. Visual Studio 2008 (XHTML 1.1 Strict, WCAG 2, Section 508)
  2. W3C Markup Validator (XHTML, direct input)
  3. Total Validator (XHTML, cut & paste, WCAG2 AAA)
  4. Total Validator (XHTML, cut & paste, Section 508)
One thing to remember about accessibility validators is that a number of rules cannot be checked in an automated system. For these, we'll depend very heavily on our community (read: you) to let us know what we're missing. While validating each rev of the master pages while in dev, we plan to create issues for each blatant, fixable failure.

References

Last edited Nov 11, 2009 at 12:17 PM by flanakin, version 6

Comments

No comments yet.