inclusive-design / AChecker

Automated interactive Web content accessibility checker.
https://achecker.ca
GNU General Public License v2.0
69 stars 61 forks source link

fix label content check when the text follows enclosed input #45

Closed judev closed 10 years ago

judev commented 10 years ago

label content following an input (e.g. checkbox) was being ignored. e.g:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Test checkbox label validation</title>
    </head>
    <body>
        <p><label><input type='checkbox' value='1'> Test Label</label></p>
    </body>
</html>
cindyli commented 10 years ago

@judev, thanks for the report and the pull request.

Can you elaborate the problem that this pull request is targeted to fix? How to produce and what to expect when the fix is in place?

It would be helpful if you could create a bug report with those information in AChecker bug tracker: http://atutor.ca/atutor/mantis/view_all_bug_page.php. Keep in mind that you need to switch the "project" drop down selection at the top right corner of this page to "AChecker". Just so it would be easier to trace back an issue and test the fix.

Thanks.

judev commented 10 years ago

The sample HTML in the pull request comment demonstrates the issue, if you paste that into the AChecker "Paste HTML Markup" box you'll see that it incorrectly says that the label contains no text.

I've copied this issue to your bug tracker.

tassoman commented 10 years ago

You see, not all screen reader are able to recognize implicit labels.

http://stackoverflow.com/questions/2895328/should-we-put-input-inside-label

Look at 1st comment: "Until user agents support explicit associations between labels and form controls, for all form controls with implicitly associated labels ensure that the label is properly positioned." Web Content Accessibility Guideline Checkpoint 10.2"

judev commented 10 years ago

Interesting ok, didn't know that. Thanks.

On Tue, Mar 4, 2014 at 7:11 PM, Pierluigi Tassi notifications@github.comwrote:

You see, not all screen reader are able to recognize implicit labels.

http://stackoverflow.com/questions/2895328/should-we-put-input-inside-label

Look at 1st commenthttp://stackoverflow.com/questions/2895328/should-we-put-input-inside-label#comment2948771_2895328: "Until user agents support explicit associations between labels and form controls, for all form controls with implicitly associated labels ensure that the label is properly positioned." Web Content Accessibility Guideline Checkpoint 10.2"

Reply to this email directly or view it on GitHubhttps://github.com/atutor/AChecker/pull/45#issuecomment-36661669 .