Here's some feedback
- You must change the aria label on that logo link. It must say name of the site and then destination e.g. W News - Home. Links already have a navigation role, never write verbose labels like "navigate to..."
- Similarly, the label on the nav toggle should say "Navigation toggle" or "menu toggle" not "Open X" and the label text should not change on click. Think about how this will be exposed to the accessibility API. It would currently be announced as "Open menu, Collapsed" or "Close menu, Expanded". That sounds kind of confusing when you compare to "Menu toggle, Collapsed/Expanded" doesn't it.
- Similar again, the label on the nav element doesn't need to include the word "navigation". It's already a nav! So just "main" or "primary" is fine
- Think through the page semantics without any styling. "The Bright Future of Web 3.0" is definitely not the page heading. This needs a visually hidden h1. Personally, I would make all article titles h3s in this and make sure appropriate visually-hidden h1 and in places h2s are added when needed. For example: h1 = "News Homepage"; h2 = "Featured"; h3 = "The bright future..."; h2 = "New"; h3s = The article titles in that section; h2 = "Most Read"; h3 = The articles within that section.
- This would benefit from using CSS grid for the main layout;
- I would expect the media query in the picture element to be defined in rem or em, just like the CSS. Not strictly necessary, just what I would do.
- Do you think all of the images are decorative on this?? I'd expect news article images to be considered meaningful content, at lease all except the abstract one.... Something to consider anyway. Not something you definitely need to change.
- The last section is clearly an ordered list so that's what it should be using in the html. (Not unordered)
- Text should never be in spans. I'd expect those numbers either to be paragraphs or pseudo content using the list counter.
Marked as helpful
Hi @grace-snow!
Thank you for your valuable suggestions and feedback! I will remember not to write verbose aria-label
s. It will definitely help me a lot in the future to check how the accessibility API displays my website so that I can better understand how it works. Logo link, nav toggle and nav labels are now changed respectively.
“Think through the page semantics without any styling”. This sentence puts a new perspective on headings for me and I definitely understand your point. It makes so much sense now. Appropriate headings have been added and existing ones tags changed. Additionally, for "New" heading I added a span with class sr-only to make this heading more descriptive like "New articles”
When I was creating the project, I noticed that it would be much easier to use grid
here, and certainly to make the page look better on different screen widths because it would be easier for me to arrange the containers. I used flexbox
because I still watch materials related to it and I wanted to consolidate my knowledge. Grid is definitely next in line and I will use it in future ones.
When it comes to alt
attributes and decorative photos. I can't answer that for you now. I need to read more about how to write good alt texts. In my opinion they should not be decorative, but on the other hand, for example, how does the photo of the keyboard relate to "Top 10 laptops”?
Picture
media query is defined with em’s now. The list in the trending section has been changed to ordered list.
I changed span
s to ::before
pseudo-class using the list counters to automatically number the trending articles. I know you pointed that out in card challenge that text should never be in divs or spans alone. It was more of a oversight or bad habit.
Thanks again and have a nice day!
@tediko I do not recommend this Additionally, for "New" heading I added a span with class sr-only to make this heading more descriptive like "New articles”
If you do that you do not always have control over the order it would be read out because half the heading is inline and half Sr-only.
If something already has a visible heading, leave it as if is.