Closed cbirdsong closed 4 months ago
Oh.
Good timing; I ran into this false positive in the Drupal side and had forgotten to port the fix for this release; I'll go fetch that code tomorrow.
As for the <a>
without an href-- an a without an href is a named anchor, not a link. The default settings ignore them so as not to false positive on things like skip-to-content target anchors. And screen readers will not announce them as links, so they're a spicy little problem.
...are there WordPress plugins that output an a without an anchor or is that custom code?
That's just the stock buttons block.
Ahh I see; until a link is added, it outputs an <a>
without an HREF that does nothing.
So...that's...broken...in all kinds of ways that the link checker is not designed to check.
I'm...tempted to write a WordPress-specific test that fires a hard error on "a.wp-element-button(:not('href'))"...
Flagging that with at least a warning would definitely be welcome.
If you are interested in testing, PR 26 includes fixes for both of these.
I've got two links here, and the first one is flagged with an error and a warning:
"Download" is a legit link (if a little ambiguous):
"View" is missing an
href
entirely:However, editoria11y is ignoring the "View" link and has flagged the "Download" link with the error "Link with no accessible text":
Compounding the weirdness:
href
to the "View" link, it complains in exactly the same way.I really have no idea what might be going wrong here. These are contained within custom blocks inside a custom grid layout container so you can't see run the code directly, but here's some snippets of the entire chunk of the page, and I could probably provide a zip file of the theme/site via email if that helps?
HTML as serialized in the editor
```htmlEducator Guide
Your one-stop reference guide for all the wonderful, educational programming Knock Knock has to offer. Our self-guided field trips allow your students to have the time of their lives playing with purpose. The guide also has step-by-step instructions for booking your field trip. Don’t let your students miss out on all that Knock Knock has to offer.
Knock Knock Curriculum Guide
Our museum’s Learning Zones and programs provide teaching and learning opportunities that correspond with Louisiana’s state Early Learning and Elementary School Standards.
HTML displayed on the front end
```htmlEducator Guide
Your one-stop reference guide for all the wonderful, educational programming Knock Knock has to offer. Our self-guided field trips allow your students to have the time of their lives playing with purpose. The guide also has step-by-step instructions for booking your field trip. Don’t let your students miss out on all that Knock Knock has to offer.
Knock Knock Curriculum Guide
Our museum’s Learning Zones and programs provide teaching and learning opportunities that correspond with Louisiana’s state Early Learning and Elementary School Standards.