Coder Social home page Coder Social logo

code-refactor's Introduction

01 HTML, CSS, and Git: Code Refactor (Mark Drummond)

My Task

I started with a working HTML&CSS web app that isn't great for web accessibility, which is important for differently-abled people as well as search engines and other machine readers. My task was to refactor the existing code to meet accessibility standards defined in these acceptance criteria:

GIVEN a webpage meets accessibility standards
WHEN I view the source code
THEN I find semantic HTML elements
WHEN I view the structure of the HTML elements
THEN I find that the elements follow a logical structure independent of styling and positioning
WHEN I view the icon and image elements
THEN I find accessible alt attributes
WHEN I view the heading attributes
THEN they fall in sequential order
WHEN I view the title element
THEN I find a concise, descriptive title

My Work

I refactored the code to replace div tags with semantic tags main, header, article, section, figure, aside, and footer. I added the "alt" attribute to the images to describe the images. I added ARIA attributes to describe non-text elements such as the div that has its background picture defined in the CSS file and the heart emoji in the footer.

I uploaded the complete web app to GitHub and made it accessible via GitHub Pages.

Mock-Up

The following image shows the web application's appearance and functionality. The finished web app looks exactly the same to the eye as the original but is more accessible to differently-abled people and machine readers.

The Horiseon webpage includes a navigation bar, a header image, and cards with text and images at the bottom of the page.


© 2021 Mark Drummond. All Rights Reserved.

code-refactor's People

Contributors

mjamesd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.