Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

[Bug] Accessibility showing failures for non-existing elements on pages #631

Closed
willstocks opened this issue Mar 1, 2019 · 7 comments
Closed
Assignees
Labels
P1 A high priority task. This task *must* be completed soon.

Comments

@willstocks
Copy link

Hi guys,

When I run a web.dev audit for my site (https://willstocks.co.uk) I've noticed that in recent weeks/months, the "Accessibility" score is "lower" than I'd expect (https://lighthouse-dot-webdotdevsite.appspot.com/lh/html?url=https://willstocks.co.uk). The main reason for this appears to be the following metrics:

Elements Use Attributes Correctly

These are opportunities to improve the configuration of your HTML elements.

1 <audio> elements contain a <track> element with [kind="captions"]
2 <input type="image"> elements have [alt] text
3 Cells in a <table> element that use the [headers] attribute only refer to other cells of that same table.
4 <th> elements and elements with [role="columnheader"/"rowheader"] have data cells they describe.

Elements Are Well Structured

These are opportunities to make sure your HTML is appropriately structured.

7 <dl>'s contain only properly-ordered <dt> and <dd> groups, <script> or <template> elements.
8 Definition list items are wrapped in <dl> elements
9 Lists contain only <li> elements and script supporting elements (<script> and <template>).
10 List items (<li>) are contained within <ul> or <ol> parent elements

Elements Describe Contents Well

These are opportunities to make your content easier to understand for a user of assistive technology, like a screen reader.

11 <frame> or <iframe> elements have a title
12 Presentational

elements avoid using <th>, <caption> or the [summary] attribute.
13 <object> elements have [alt] text

The confusing/weird thing about this is: I don't use any of these elements on my site. Not only that, but when I expand each metric to try and work out why I'm seeing this "failure", it doesn't provide me with an example of the failing elements, as with all other metrics (likely because there are none?).

Let me know if I can provide any more info? I'm not going to lie, I'm not 100% fussed by this as I know those elements aren't there and aren't actually failing - it just pains me to see orange ;) (and could cause confusion?)

@willstocks willstocks changed the title [Bug] Accessibility showing [Bug] Accessibility showing failures for non-existing elements on pages Mar 1, 2019
@robdodson
Copy link
Contributor

Hey @willstocks-tech are you only seeing this when you click the 'View Report' button and it takes you to lighthouse-dot-webdotdevsite.appspot.com?

Do you see those same errors on the /measure page itself?

@robdodson robdodson assigned robdodson and unassigned robdodson Mar 1, 2019
@robdodson
Copy link
Contributor

ah I bet it's related to this change.
GoogleChrome/lighthouse#6783

I bet the rendered that
lighthouse-dot-webdotdevsite.appspot.com is using needs to make sure it's using the right variant of notApplicable.

@robdodson
Copy link
Contributor

I think I fixed this. Can you try again and let me know if you still see the issue?

@robdodson robdodson self-assigned this Mar 1, 2019
@willstocks
Copy link
Author

Will give it a go now - worth me noting that when I revisited web.dev I got the following console error:

Access to fetch at 'https://accounts.google.com/o/oauth2/v2/auth?state=*tokens and stuff here*' (redirected from 'https://web.dev/') from origin 'https://web.dev' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I managed to get logged in though (took a cache clear, but I'm logged in regardless of that error!)

@robdodson robdodson added the P1 A high priority task. This task *must* be completed soon. label Mar 1, 2019
@willstocks
Copy link
Author

OK - looking much better! https://lighthouse-dot-webdotdevsite.appspot.com/lh/html?url=https://willstocks.co.uk - no unused elements showing in the accessibility section and my score is back up to where I expected it to be 😁

Some weird console errors about resources not being accessible are now being reported (they defo are, as the audit I ran just before scored perfectly on best practices (aka there were no console errors) and I've justed checked across an array of devices/networks).

It was complaining about:

and

Error logged:

Failed to load resource: net::ERR_ACCESS_DENIED

Do you want me to spin this off into another issue @robdodson?

@willstocks
Copy link
Author

Weird... I closed the web.dev tab, launched another tab and navigated to web.dev and it had logged me out again...

Either way, ran another audit and best practices is back up to 100 so turns out it was a non-issue/fluke!

Thanks for sorting @robdodson 😁👍

@robdodson
Copy link
Contributor

Hm not sure about the other errors or the weird logging out. I'll go ahead and close this issue and if you still see those other things happening let me know and we can create a new one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 A high priority task. This task *must* be completed soon.
Projects
None yet
Development

No branches or pull requests

2 participants