Redefining Web Design: The Essence of Progressive Enhancement
Written on
Progressive enhancement refers to an approach to web design that prioritizes accessibility and usability by focusing first on content before adding enhancements. This method serves as a foundation for creating user-friendly web experiences, which is especially crucial given the legal requirements for accessibility in many industries.
Despite its importance, many self-identified designers may not fully grasp the concept, or they might overlook it due to concerns about their skillsets becoming outdated. It's essential to recognize that design encompasses both aesthetics and functionality, making it imperative to consider accessibility from the outset.
This article is a refreshed take on a previous piece I wrote over ten years ago, which has since become outdated.
Note: This guide assumes you have at least a basic understanding of HTML and CSS. For newcomers, I recommend exploring introductory tutorials on MDN.
What is Progressive Enhancement?
To break it down simply:
- Begin with your content in a basic text editor, ignoring styles or HTML. You may use shorthand for headings and image placement, but your main focus should be ensuring the content remains usable even if the markup fails. Remember, text is fundamental on the web; everything else is secondary. If you anticipate using images or icons, represent them with text that can later serve as ALT text or can be hidden through image replacement methods.
- Apply semantic markup to the content, clarifying what each element represents within a well-structured document. Avoid using neutral tags like DIV or SPAN, which add no meaning, unless absolutely necessary. At this stage, you can assign IDs for specific navigation or semantic purposes.
- Develop your desktop layout by leveraging existing semantic markup while adding classes or IDs only when required. Avoid using DIV or SPAN for styling unless it’s the last option. All CSS should reside in an external file linked with a media attribute, e.g., media="screen". The layout should be semi-fluid with a maximum width and elastic dimensions, using EM or REM units. Using PX is not advisable. Be cautious about cluttering your code with presentational classes; it’s akin to reverting to outdated practices.
- Once the layout is established, adjust the window size to identify breakpoints where the layout needs to be modified, such as collapsing columns or adapting menus. I believe that the "mobile-first" approach is counterintuitive since removing styles is generally simpler than adding them, especially when considering legacy user agents that often lack media query support.
- Repeat the adjustments until the layout is optimized for around 16em in width (256px for typical users). This creates a responsive design tailored to the content's needs rather than following arbitrary grid systems.
- Now, add your design elements, including colors, shadows, rounded corners, and other stylistic features, akin to frosting a cake.
- For targeting other media types like print, replicate steps three to six with a separate CSS file designated for that media, e.g., media="print".
- Finally, enhance the user experience with JavaScript only after ensuring that the page is functional without it. If a feature can be implemented without JS, prioritize that to avoid accessibility issues. All scripts should be sourced from external files.
This outlines the process of progressive enhancement, which emphasizes the separation of concerns and fosters a design that degrades gracefully.
Graceful degradation means building your site so that if any advanced feature fails, the core usability remains intact. A well-structured and designed page should function even when scripting, CSS, or images are disabled. It's crucial not to assume all users have perfect vision or are using screens.
Many who fail to appreciate HTML semantics may not grasp this concept, which has led to the decline from the semantic practices of HTML 2 to the clutter of HTML 3.2.
Note: When discussing “transitional” HTML, it’s essential to clarify that it denotes a shift in development practices, much like transitioning between motor components.
Let's Implement It!
Now, let’s create a home page featuring the following elements:
- A header with a mobile-friendly "hamburger" menu.
- An introductory section with a heading, description, and two action links.
- A pricing section.
- An avatar/profile cards area.
- A footer with legal disclaimers and links.
- Social media links.
- A contact form.
- A user login form.
This setup covers a variety of sections commonly found on web pages.
Step One: Just the Content
Open your preferred plain text editor. Avoid IDEs with auto-correction or color syntax highlighting that may distract you. Focus solely on the text or a rough guide of what text will be included.
SITE TITLE
Home - Tutorials - FAQ - Contact - Sign In
Introduction
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus id nisl ultricies, accumsan tortor non, molestie nisi. Mauris sed porta augue. Ut ornare velit consectetur dui fermentum, non faucibus mauris feugiat. Phasellus dictum, massa non laoreet sagittis, erat augue pretium enim, vitae mattis quam risus eget nisl.
Get Started - Learn More
Prices
Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam vehicula neque sed libero suscipit ultricies. Pellentesque sit amet nisi et dui hendrerit laoreet at et urna. Nunc ac ultricies dui.
Free $0/mo 1 User Account 2gb storage 100mbps Throughput E-mail Support Only
Sign Up Now!
Standard $15/mo 10 User Accounts 100gb Storage Up to 1gbps Throughput (based on availability) Priority E-mail And Phone Support
Order Now
Enterprise $50/mo 25 User Accounts 250gb Storage Up to 10gbps throughput, 5gbps guaranteed Priority E-mail And Phone Support
Our Staff
Sed pellentesque sed nulla a malesuada. Sed vitae maximus sem. Vivamus pharetra tincidunt lobortis. Praesent ut mauris leo. Nam justo ex, port