9.LogoToHeaderFinish-HuffPostClone

BNTA logo

HuffPost Clone - Logo To Header Finish

Objectives

  • Using aria-label and role for accessibility

  • Completed Header

  • Screen Reader run through

  • Axe DevTools

  • 1st Commit

Table of contents

Using aria-label and role for accessibility

  • We saw previously what aria-label and role are used for but let's see them in use in another example

  • Above is the anchor tag that wraps around our logo svg

  • We are using the aria-label attribute to tell a non-sighted user where they will be taken to upon interacting with our logo

  • In this instance we've altered the default role of the anchor tag from a link to being a button.

Completed Header

  • Now if we run through with a Screen Reader we can see how our website works but how sure can we be that we are not breaking any accessibility guidance

Axe DevTools

  • Luckily there exists accessiblity checkers that we can use to find and fix any accessibility issues during development.

  • One of these tools is axe DevTools which is a google chrome extension.

Axe DevTools Chromearrow-up-right Axe DevTools Firefoxarrow-up-right

To use Axe DevTools in Chrome:

  • open inspect element in chrome or developer tools

  • click the double arrow at the top of the dev tools window seen below

Find Axe DevTools
  • Then select Axe DevTools

  • Click Scan Page as seen below and Axe DevTools will check your website for any accessibility issues

Use Axe DevTools

1st Commit

  • Now we have completed our header ticket, we are ready to commit our work to version control

  • To do that we first make sure we are in a folder high enough up the directory tree to contain all of the changes we have made.

  • We then add our files to staging, this is like a limbo land where work is waiting to be committed. We do this with the command:

  • This adds all the changes to files in the current folder as well as the folders children to the staging area.

  • We can check what files have been added to the staging area with the command:

  • Now that we have checked that our files have been added to the staging area, we can commit with the command:

  • We can check that our commit worked with the command:

  • And finally we can push to our github repo using the command:

Last updated