CSS Menu

Issues related to hyperlinks and web site navigation.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/links.html
Post Reply
piotrh
 
 
Posts: 173
Joined: Sat Mar 15, 2014 11:00 pm

CSS Menu

Post by piotrh »

Pablo,
I used Google lighthouse to check site I made. Results are great but there is one element I would like to fix but dont know how:

List items (<li>) are not contained within <ul> or <ol> parent elements.
Screen readers require list items (`<li>`) to be contained within a parent `<ul>` or `<ol>` to be announced properly

How can I correct this?
User avatar
Pablo
 
Posts: 21716
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: CSS Menu

Post by Pablo »

What exactly did you do?
What are your settings?
Do you have a demo project?

Related FAQ:
https://www.wysiwygwebbuilder.com/forum ... 10&t=82134
piotrh
 
 
Posts: 173
Joined: Sat Mar 15, 2014 11:00 pm

Re: CSS Menu

Post by piotrh »

Its about this page:
/link removed/

I dont think I did something unusual. Just configured css panel style properties, thats all...
P
Last edited by piotrh on Tue Aug 11, 2020 9:30 am, edited 1 time in total.
User avatar
Pablo
 
Posts: 21716
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: CSS Menu

Post by Pablo »

The menu is correctly constructed.
piotrh
 
 
Posts: 173
Joined: Sat Mar 15, 2014 11:00 pm

Re: CSS Menu

Post by piotrh »

Ok. Any Idea why it fails this test? I tried many times. Output messaage is always like I mentioned before. :/
User avatar
Pablo
 
Posts: 21716
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: CSS Menu

Post by Pablo »

Maybe the test does not like that you have moved the scripts and css to the end of the page? (in Tools->Options->HTML)
piotrh
 
 
Posts: 173
Joined: Sat Mar 15, 2014 11:00 pm

Re: CSS Menu

Post by piotrh »

Moving scripts and css to end of page improved performance metrics (+10-15%).
Before and after moving them, list items were listed as Failing Elements.
P
User avatar
Pablo
 
Posts: 21716
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: CSS Menu

Post by Pablo »

If you manually check the code then you can see it's correct
piotrh
 
 
Posts: 173
Joined: Sat Mar 15, 2014 11:00 pm

Re: CSS Menu

Post by piotrh »

Pablo, Im not saying it is not correct.
I'm just trying to figure out why google lighthouse sees it as incorrect.

P
User avatar
Pablo
 
Posts: 21716
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: CSS Menu

Post by Pablo »

I'm sorry, I am not familiar with google lighthouse.
But I think the problem is somewhere else.
robertz
 
 
Posts: 7
Joined: Sun Jun 26, 2005 9:35 pm
Location: Florida, USA

Re: CSS Menu

Post by robertz »

@piotrh

Maybe if you move just the following 4 links back to / between <head></head> tags

<link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
<link href="favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
<link href="favicon-64x64.png" rel="icon" sizes="64x64" type="image/png">
<link href="apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">

you will make google lighthouse happy!

See the validator:
https://validator.w3.org/nu/?doc=https% ... tyja.pl%2F
piotrh
 
 
Posts: 173
Joined: Sat Mar 15, 2014 11:00 pm

Re: CSS Menu

Post by piotrh »

Hello @robertz
Thank You for Interest in the topic. Unfortunately changing location of elements mentioned in Your reply did not make lighthouse happy.
It has problem with css menu. If i change li to div i got highiest score in Accessibility (but my menu is broken, of course). If I change it back to li score is lowered to 96%.
User avatar
crispy68
 
 
Posts: 2751
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: CSS Menu

Post by crispy68 »

I looked at your site in Chrome and did and audit and I don't see anything mentioned about the <li> tags failing. Under the accessibility, it showed that this 'passed' the audit. What I showed that 'failed' was "links do not have a discernible name" and the failing element was a#OverlayMenu1
piotrh
 
 
Posts: 173
Joined: Sat Mar 15, 2014 11:00 pm

Re: CSS Menu

Post by piotrh »

Hello crispy68,
If You hit f12 in chrome google lighthouse tool will show up. Then after generating raport You should see Performance, Accessibility, Best Practices and SEO meters. If You click on Accessibility score it will scroll down to point where it tells about list items being cause of lowering the score.
P
User avatar
crispy68
 
 
Posts: 2751
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: CSS Menu

Post by crispy68 »

Correct. I only did your homepage. The results I saw is what I stated before. No issues with the <li> tags.
piotrh
 
 
Posts: 173
Joined: Sat Mar 15, 2014 11:00 pm

Re: CSS Menu

Post by piotrh »

Here is what I got everytime:

Image
User avatar
crispy68
 
 
Posts: 2751
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: CSS Menu

Post by crispy68 »

I've tried on 2 different computers at 2 different locations and i'm not seeing any issue. This is what I see:

Image

Image

As you can see, the <li> tags passed. To be honest, it is clear by the html code that the <li> tags are correct as Pablo stated before. So despite what you are seeing, the code is correct.
User avatar
crispy68
 
 
Posts: 2751
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: CSS Menu

Post by crispy68 »

Actually, I tested it on the mobile setting and it passes which to me makes no sense. When tested on 'desktop' I now see what you are seeing.

However, it is wrong as it is in a <ul> tag. The drilldown menu you are using is set up the same way and not being flagged.

Personally, I wouldn't worry about it as you can confirm it is correct. Google is not always 100% accurate.
piotrh
 
 
Posts: 173
Joined: Sat Mar 15, 2014 11:00 pm

Re: CSS Menu

Post by piotrh »

I'm not concerned too much about it. Just thougt if i can have 100% - why shoul'dnt I try?
Site builded in WWB performs great and I'm very happy because of that.
Thank You for Your time crispy68.
P
Post Reply