@PhoenixDev22
Posted
Hello @humbruno ,
I have some suggestions regarding your solution:
-
First of all, You are misusing the
<section>
tag .This doesn't need any sections, section is not meant to be used as a containers. section is for a bigger chunk of content often titled by<h2>
. -
Use
<p>
to wrap theclass="car__description"
. -
For any decorative images, each img tag should have empty
alt=""
andaria-hidden="true"
attributes to make all web assistive technologies such as screen reader ignore those images. In this case, all images are decorative only. -
swap the buttons for anchor tags. Clicking those
"learn more"
buttons would trigger navigation not do an action so button elements would not be right. -
you can add a
<h1>
withclass="sr-only"
(Hidden visually, but present for assistive tech). And use<h2>
for the heading.
.sr-only {
border: 0 !important;
clip: rect(1px, 1px, 1px, 1px) !important;
-webkit-clip-path: inset(50%) !important;
clip-path: inset(50%) !important;
height: 1px !important;
margin: -1px !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
white-space: nowrap !important;
}
- It would be like this:
<div class="card card--suvs">
<img src="images/icon-suvs.svg" alt="" aria-hidden="true"/>
<h2 class="">SUVs </h2>
<p class="car__description">
Take an SUV for its spacious interior, power, and versatility.
Perfect for your next family vacation and off-road adventures.
</p>
< a href="#" class=""> Learn More</a>
</div>
-
Never use
px
for font-size. -
You should use
em
andrem
units .Bothem
andrem
are flexible, Usingpx
won't allow the user to control the font size based on their needs.
Overall , your solution is good . Hopefully this feedback helps
Marked as helpful
@humbruno
Posted
@PhoenixDev22 Thank you! That's great input and I'll definitely keep in mind for the next one :)