Lesson 2.7: Making Tech Accessible

🎯 Objectives

  • Understand the importance of accessibility in technology.
  • Learn about color contrast and the role it plays in accessibility.
  • Implement changes to enhance accessibility using HTML and CSS.
  • Learn to use hex colors for better visibility.
  • Understand and apply alt attributes for images to enhance accessibility.

Table of Contents

  1. Accessibility & Contrast
  2. Code Along Part 1: Color Contrast
  3. Alt Attributes

Accessibility & Contrast

  • Problems with inaccessible websites - it's important to make tech accessible and inclusive.
  • Rule of thumb for color contrast: 4.5:1 ratio.
  • Use of hex colors for better contrast.
p {
  color: #fcba03;
}

Alt Attributes

  • Important to use in your code for blind and visually impaired users.
<img alt="dog running" src="https://dogs.com/image.jpg" class="dog-pic">

Key Takeaways

  • Accessibility matters: Tech must be accessible to everyone, and simple measures can make a big difference.
  • Color Contrast: Proper color contrast is crucial for readability. A ratio of 4.5:1 is recommended for non-bold text.
  • Hex Colors: Utilize hex color codes for precise control over color shades.
  • Alt Attributes: These provide descriptions of images for screen readers, aiding visually impaired users.
  • Always Check Your Work: After making changes, always check your work in the browser and through other tools like color contrast tools or screen readers.

Resources

Happy coding!