DEV Community

Discussion on: Interview Questions on web Accessibility - Part 2

Collapse
 
grahamthedev profile image
GrahamTheDev

A great post, but surely, when talking about accessibility, the one thing you should do is not use pictures of code with vague alt descriptions. That isn't very accessible! 🤣🤣.

You can add code blocks easily using triple back ticks ``` and then the language you are using (as then you get the correct syntax highlighting but you can just use ``` and not specify a language). You then close the code block with triple back ticks again like so:

``` css
/* your css code */
```

Which results in:

h1{
    color: #fff;
    font-size: 24px;
}
h1:before{
    content: 'click here'
}
Enter fullscreen mode Exit fullscreen mode

Also for question 6 (you forgot to answer it 😋) the answer is entirely based on the context in which it is placed. My guess would be "no" as the alt description is not good if this is the company logo but it is impossible to say (especially as if this is contained within a hyperlink, as is the norm with logos, then the text within the alt description should change to reflect the link purpose).

Would I hire you based on those answers? I probably would so great answers overall 🤩

Collapse
 
hellonehha profile image
Neha Sharma • Edited

Aah!!

  1. Alt tags I added "CSS Code snippet". (What you think should be the right alt tag? Just thinking now...how I can have better alt tags for these screenshots.)

    1. The answer is in the original post (a11ytips.dev/docs/interview-questi...). yes, seems like while moving content here I missed it. I will update it. Thank you.

I will update the code block syntax.

Thank you for reading and sharing your feedback. Highly appreciated. 🙏

Collapse
 
grahamthedev profile image
GrahamTheDev
  1. I meant replace the images of code with the actual code itself using the technique I described. That way screen reader users can just read the code! As an added bonus if anyone ever wanted to copy paste your code they could, or if they prefer a different colour scheme they can change it etc!

  2. Not an issue, easily missed when moving stuff, completely get it!

Look forward to seeing more from you, followed!

Thread Thread
 
hellonehha profile image
Neha Sharma

Post updated & Followed you too.

Thank you :)