Redesigned it again to give it a better code quality.
Deepak Parmar
@deepak-parmarAll comments
- @zaidansari42Submitted over 2 years ago@deepak-parmarPosted over 2 years ago
@zaidansari42, for best practice I suggest...
- You should use figure/figcaption tag for the image and the paragraph,
caption
tag is specifically used fortable
.
<figure> image h1 <figcaption> p </figcaption> </figure>
This would improve accessibility and won't change the design. Hope this helps 👍
Marked as helpful0 - You should use figure/figcaption tag for the image and the paragraph,
- @KohseyPowerSubmitted over 2 years ago
Hi everyone !
This is my final submition for this challenge. Don't bother to tell me If I made mistakes.
Feedback are welcome ! Thanks in advance
@deepak-parmarPosted over 2 years ago@KohseyPower,
You can apply multiple classes on an element by separating them with space like this,
<div class="column Luxury"></div>
, but you cannot add more than oneclass=
attributes to an element like this<div class="column" class="Luxury"></div>
Marked as helpful0 - @glg-devSubmitted over 2 years ago@deepak-parmarPosted over 2 years ago
@glg-dev, Nice work on the challenge, your design has no flaw at all.
You've used radio input for rating buttons, which I find the best way to implement this component; so kudos to that. 👏
- Your page reloads right after clicking the submit button and
.thanks
section is briefly visible before the page reloads. For that I suggest you usesubmit
event-listener instead ofclick
and prevent submission of the form by usingpreventDefault( )
method ofevent
object and them call thesubmitForm( )
function
submitButton.addEventListener("submit", (event) => { event.preventDefault(); submitForm() }
- Next, for accessibility of the component wrap
.container
and.thanks
elements usingmain
tag and.attribution
element usingfooter
Hope these helps, keep coding! 👍
Marked as helpful0 - Your page reloads right after clicking the submit button and
- @Arslanj9Submitted over 2 years ago
First project on javascript.
@deepak-parmarPosted over 2 years ago@Arslanj9,
-
Your path to
main.js
is not working, remove/
from the beginning of it. It should be justjs/main.js
or add.
in front on it for best practice like this,./js/main.js
-
Submitting a form reloads the page, so after clicking the submit button the page reloads and returns to its original states; to prevent that use
submit
event-listener
submitBtn.addEventListener("submit", (event) => { event.preventDefault() btnClick() })
event.preventDefault()
will stop the submission process of the form.- For accessibility issue, wrap your
header
usingmain
tag
I hope this work out. keep coding 👍
Marked as helpful2 -
- @anhhuynh1506Submitted over 2 years ago
I am not sure about the background. I tried to make it to look like the design but I see it is not really correct.
@deepak-parmarPosted over 2 years ago@anhhuynh1506, Visually your work looks so great.
You just have resolve some accessibility issues...
- Document should have one main landmark: for this wrap your whole
section
element usingmain
tag. - Page should contain a level-one heading: heading elements (h1-h6) should always be in order and should always start from the level-one heading
h1
. For your "Order Summary" heading useh1
instead ofh2
. You already havefont-size
property set for the heading, so you'll just have to make a few changes there.
The design won't change a bit, but these changes will improve the accessibility of your component. Again nice work on the challenge. Keep coding! 👍
0 - Document should have one main landmark: for this wrap your whole
- @lauriselvijsSubmitted over 2 years ago@deepak-parmarPosted over 2 years ago
@lauriselvijs, Your work looks amazing, nice work on theme switching!
- The dice button and the divider becomes hard to spot in light mode. Applying
filter: invert(1)
to both will work just nicely. - and also add
cursor: pointer
to dice button and theme-switching button for better UI feedback.
Marked as helpful0 - The dice button and the divider becomes hard to spot in light mode. Applying
- @kaminskimaciejSubmitted over 2 years ago@deepak-parmarPosted over 2 years ago
@kaminskimaciej, visually your works looks great!
First of all, you need to renew the screenshot and regenerate the report of your submission.
After then, you just have to eliminate some of the accessibility issues...
- Heading elements should always be used in order from
h1-h6
. For your.title
element useh1
tag instead ofh2
, it won't change anything in the design. - The same error is also caused by the
h5
tag later in your code. I suggest not usingh5
and use<p>
tag for it, since it is more like a label than a header. - Next, you need to wrap your whole
.container
element inside the landmark tag<main>
, cause all pages must have a landmark element.
You code looks decently clean, I suggest using some code formatter to automate that part.
I hope this clears up the issues. 👍
0 - Heading elements should always be used in order from
- @KAMA-Kasckak-MartinSubmitted over 2 years ago@deepak-parmarPosted over 2 years ago
@KAMA-Kasckak-Martin,
your image is not being loaded, replace
/
with./
at the beginning of your image's path (like this,./images/image-qr-code.png
)-
/
at the beginning means it'll looks for files at the root of the URL which is https://kama-kasckak-martin.github.io but your solution is available at https://kama-kasckak-martin.github.io/QR/ -
./
will look for files from where it is currently hosted at.
If this is confusing I recommend this article from MDN Docs https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_is_a_URL Especially, Absolute URLs vs relative URLs section.
and this one from W3Schools
https://www.w3schools.com/html/html_filepaths.asp
These might clear out lots of thing Pathing doubts.
Marked as helpful0 -
- @pouyanasrSubmitted over 2 years ago@deepak-parmarPosted over 2 years ago
@pouyanasr, visually your work looks great, nice work!
but your use of
h4
andh5
right after usingh1
is raising an Accessibility Issue: Heading levels should only increase by one. There cannot be discontinuity between heading elements, these should be used in order.h2
should follow afterh1
and so on.I suggest that you use
p
tag stats and just give themfont-size
value just ash5
andh4
which you can see in the browser console. This way the design won't change and will be still accessible.Other than that I see that your code has inconsistent spacing, It's a bit of a hassle to make the code look clean, I recommend using code formatter in your code editor.
I hope these helps, keep coding! 👍
Marked as helpful0 - @DylanMuldoonSubmitted over 2 years ago
Any advice on how i could of done better would be great just looking to improve!
@deepak-parmarPosted over 2 years ago@DylanMuldoon, instead of
div
to hold.car-card
element use the semantic tag<section>
. That would improve the accessibility further more since articles have sections.1 - @vasyaqweSubmitted over 2 years ago
It was a pretty ease one. Didn't have any difficulties along the way. One thing I think would be cool to implement is the typewriter animation when the advice comes in. I googled it a little but no results.
@deepak-parmarPosted over 2 years ago@vasyaqwe,
For typewriter animation you can use JavaScript's
setInterval()
function to add each letter to.advice-text
paragraph once advice is fetched. https://developer.mozilla.org/en-US/docs/Web/API/setIntervalStill, this would take some research. I'm sure you'll have fun.
And for the accessibility issue, I suggest use
h1
for the.advice-number
element instead ofspan
, because screen reader devices won't know where to start reading the content without a landmark element such ash1
. You've already setfont-size
for.advice-number
so usingh1
won't affect the design but will improve accessibility of your app.Hope these helps. 👍
Marked as helpful1 - @aminafolioSubmitted over 2 years ago
I couldn't get the footer to go to center and I haven't learnt css grid yet. I will start learning it today. Other than the concepts I dont know, is the project okay, it terms of responsiveness and closeness to design?
@deepak-parmarPosted over 2 years ago@aminafolio,
The attribution section isn't necessary to keep since it's not part of the designs and might interfere with the design. I usually don't keep attribution.
However you need to take care of some accessibility issues. Screen reader devices requires landmark element to jump on when page loads therefore...
- Wrap your
.root
element with landmark tagmain
- prefer to wrap .attribution using
footer
tag, if you're planning to keep it.
Other than these, your work looks nice and code is decently structured. Nice work 👍
Marked as helpful0 - Wrap your