@VCarames
Posted
Hey there! 👋 Here are some suggestions to help improve your code:
-
You only need one
source
in inside yourpicture
element. The only reason you would need more than onesources
is because you have a light/dark theme or your are using different image formats and want to have a fallback. -
Remove the
<br>
elements you added; they are unnecessary. You will create the line breaks usingpadding
. -
Currently, the old price (169.99) 🏷 is not being properly announced to screen readers. To fix this, you are going to wrap the the price in a
Del
Element and inside it you will add aSpan
Element with an sr-only class that will state something like “The previous price was…” and use CSS to make it only visible to screen readers. -
Implement a Mobile First approach 📱 > 🖥
With mobile devices being the predominant way that people view websites/content. It is more crucial than ever to ensure that your website/content looks presentable on all mobile devices. To achieve this, you start building your website/content for smaller screen first and then adjust your content for larger screens.
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! 🍂🦃
Marked as helpful
@NitaLewska
Posted
@vcarames That's cool that you've given so many pieces of advice except of the one i've asked about =)
@VCarames
Posted
@NitaLewska
Whats the question? I did not see one in the question section...
(If its about the "BEM Methodology"... I don't use it. So I would be of no help.)
@NitaLewska
Posted
@vcarames yeah =) BEM is really popular here in Russia, so I want to learn how to use it properly
- I'll correct
source
- i've taken this piece of code from some example, thanks to you, I've read how to use it properly, thanks =) del
? =) this is first time me hearing about this, I'll definitely check it out, and the whole idea about invisible spans for screen-readers. Do you know any good vids/courses on ARIA and assesibility?
@VCarames
Posted
@NitaLewska
That's pretty interesting. I had no idea BEM was that popular. I seen some users use it here, but most create their own naming convention.
Here are some articles regarding BEM:
https://en.bem.info/methodology/quick-start/
https://css-tricks.com/bem-101/
https://www.devbridge.com/articles/implementing-clean-css-bem-method/
When it comes to accessibility, each country has their own standards. But for multinational companies is crucial to ensure access to everyone.
Here are some articles regarding website accessibility:
https://www.accessibilitychecker.org
https://webaim.org/techniques/css/invisiblecontent/
https://www.w3.org/WAI/fundamentals/accessibility-intro/#examples
Marked as helpful
@NitaLewska
Posted
@vcarames thanks a lot!
@VCarames
Posted
@NitaLewska
No prob. Keep it up!