Category: Best Practices

Page or Site Redirects

Redirects are important when webpage URLs change on your website. There are many reasons why this could happen:

  1. your site’s root folder name may need to change because your department is going through a name change
  2. you may change the name of a folder or subfolder
  3. you may move a page, folder, or file
  4. you may delete a page, folder, or file

When any of these actions occur, it is important that a proper redirect is put into place. This ensures that the old URL continues to work for any users who find it or have it saved.


Recommended Formatting of Hours

There are many instances when you need to display hours on your webpage—hours of operation, advisor walk-in hours, and learning center times to name a few. The following formatting recommendations and tips for displaying basic hours will make them easy to see and understand by both sighted users and anyone using a screen reader. Additional formatting information can be found in the University Editorial Guide.

Sidebar with Hours title and example hours.
Basic hours of operation differentiate by time of year.
Sidebar with Make an Appointment title and text and hours in the content.
Basic hours with additional text.


Creating Headings

It is important to use properly structured HTML headings when organizing your web content. Think of webpage headings as a table of contents for a story.

Headings are not required on webpages. However, they help break up and organize lengthy informational webpages—improving readability. Proper heading use is not only important for accessibility, it also has search engine optimization benefits, which can help your webpages rank higher in Google’s search results.


Proper Content and Page Structure

The following tips are meant to help CMS liaisons with day-to-day maintenance of basic content on their websites.

Paste as Text

If you paste content from a document or email into OU Campus, you will likely get a bunch of bad code added behind the scenes that will effect how your webpage will look at function. To avoid issues, try clicking the “Paste as Text” button before pasting your content or use the Ctrl + Shift + V key combination.

Paste as Text shortcut
Paste as Text shortcut

The negative to pasting as text is that you will have to do some formatting manually (adding bold, adding links, etc). However, this will ensure that your website meets brand standards and works correctly on all devices.

Headings

It is important to use proper HTML headings instead of bold paragraphs or single lines of text. To apply a heading style to a line of text, put your cursor inside of the line of text and then select a heading level from the left-most dropdown menu in OU Campus. The same method working in other online applications, such as Google Docs.


Writing Good ALT Tags

ALT tags (also known as Image Descriptions) are a very important feature involving all images on any given website. Moz does a good job of explaining what ALT tags are. Please take a moment to read up on what ALT tags are and why they are important. Moz also provides some tips for how to write good ones.

There are many uses for ALT tags. The most well-known ones are:

  1. Screen readers will speak the ALT tag of an image for users who cannot see
  2. If an image cannot be loaded due to some sort of network or IT error, the ALT tag will display instead
  3. ALT tags boost search engine rankings and can help your website’s images display in Google search results


How to copy/paste clean code

Have you ever pasted content into the CMS, and it just doesn’t look right? You’re probably carrying old formatting code into the new CMS. Common culprits are copying from a Word document, copying text from one browser and pasting it into another, or copying text that was formatted in-line (using <span> and <style> tags directly in the code instead of letting the preformatted stylesheets do the work.)

Adding content with this type of formatting is bad for a couple of reasons:

  • It doesn’t let your page update with the rest of the CMS. We may decide to change the font size or style to make the site more accessible or to keep up with modern design trends. By using the standard heading (<h1>, <h2>, etc) and paragraph (<p>) tags, your content will be ready to shift in an instant. If you leave hard-coded styles in the page, your look won’t automatically change.
  • It can look strange on different devices. Everything on our new template is designed to expand and contract with the user’s screen size. Hard-coded styles may not change in the right way between desktop and mobile.
  • It’s annoying for you, the CMS user. Sometimes you’ll have lines and lines of needless code – annoying when you’re trying to find one or two words in pages of <span>s and <color>s. For example, look at the coding on the links below—the <u> and <span> tags make for messy code on the back and and ugly links on the front end.

Screen Shot 2017-06-30 at 2.38.47 PMScreen Shot 2017-06-30 at 2.40.52 PM