equalizedigital / accessibility-checker

GNU General Public License v2.0
14 stars 8 forks source link

Plugin no longer flagging missing form labels #543

Closed amberhinds closed 5 months ago

amberhinds commented 5 months ago

Please give us a description of what happened.

On our demo site, the plugin is no longer flagging Missing form labels even when they are missing.

Please describe what you expected to happen and why.

I have 5 examples of missing form labels on our demo site, but none of them are coming up in the report as failing.

<form>
<h3>No matching for attribute</h3>
<input id="subscribe" name="subscribe" type="checkbox"> <label>Subscribe me to the newsletter.</label>

<h3>For and Id mismatch</h3>
<input id="privacy" name="subscribe" type="checkbox"> <label for="privcy">I agree with the privacy policy.</label>

<h3>No Label</h3>
<input id="no-label-but-id" type="text">

<h3>Empty aria label</h3>
<input name="search" type="text" aria-label="" id="search-no-label"><button>Submit</button>

<h3>Empty aria labelledby</h3>
<input name="email" type="text" aria-labelledby="">
</form>

How can we reproduce this behavior?

See the Accessibility Checker report on https://demosite.equalizedigital.com/wp-admin/post.php?post=60&action=edit

Technical info

SteveJonesDev commented 5 months ago

@amberhinds, it was this strict comparison added a few months ago. We'll get it fixed. Screenshot 2024-03-26 at 5 09 50 PM

amberhinds commented 5 months ago

@SteveJonesDev is there any way with the automated tests you all are writing to have it automatically check snippets that we provide as pass/fail examples to confirm it's still checking as it should be?

pattonwebz commented 5 months ago

@amberhinds so far the tests have been much smaller snapshots than the tests against examples that are on the demo site but we talked about exactly that and I've been thinking through some ways that we could make that happen.

How do you (or we) feel about distributing the posts from the demo site inside of the repo as a WP export file for importing into an automated test suite that could run in CI on release branches? Any privacy or data concerns about that?

amberhinds commented 5 months ago

I want to check through those posts before I give a blanket yes, only because I may have copied code from a client site or something.

If you give me a week to do some cleanup, I think it might be good. TBH, I've been thinking that we should have the ability for people to spin up a demo of the Pro plugin to play with. Establishing what this content is would probably be a step in that direction.