pdfae / PDFAInspector

PDF Accessibility Inspector
9 stars 3 forks source link

Forms Tab Feedback #26

Closed clblew closed 12 years ago

clblew commented 12 years ago

Ran a doc that was done correctly and showed all as passed!

"Form Elements Must Have Names" I tried to create a form element with no name and this is not possible. If you don't give it a name, it gives it a default name like "text1". So, this rule may not be applicable as it will always pass. What CAN be done in regards to the form element names is that you can have an element with the same name. The reasons this could happen is that you insert a text box and then you copy and paste it for all your other text boxes. So, maybe the test needs to look for duplicate names for form elements.

I created a file with form elements in it that had duplicate names and errored the inspector twice: http://pdfae.webfactional.com/reports/e71a7333-224d-44b9-94ed-75a1880228ba/treeview/ http://pdfae.webfactional.com/reports/5cbb3471-af5e-4c93-a9a1-fa25f7c55e97/treeview/

The error came when you clicked on the tags tab. All the other tabs showed "Results not found" so, I am not sure what happens when a document has form elements with the same name.

Oops, seems I may have broke something, will add this in another issue.

schiele1 commented 12 years ago

Perhaps this should be a manual check, then? To make sure the Name is descriptive of the form element?

With regards to duplicate names, should every form element have a unique name, or only form elements of the same type?

clblew commented 12 years ago

Each should be unique. What happens if they are not is that the information that you type in carries over into each form element that has that name. So you end up duplicating your reponses. I guess this would be fine if you are wanting to repeat a reponse for some reason (maybe they type their name in at the top and it automatically fills it in on a later field so they don't have to retype it??) I haven't ran into any forms that use duplicate fields on purpose.

clblew commented 12 years ago

I believe form elements of the same type is all you have to be concerned with but it is good practice to make all of them unique no matter the type of element.

klange commented 12 years ago

For future reference, the processing step which failed here was the iText JSON/XML extraction?

clblew commented 12 years ago

So should I re-run the reports?

schiele1 commented 12 years ago

Found the error. It was in the tag parser. It's that stupid null character thing again. I've applied my alt-text null-char sanitizer to general tags and it solves the problem for the provided documents. See this commit: https://github.com/klange/PDFAInspector/commit/542b5d5fcc0052616dbb301d1f848365f66cdecf In short, it had nothing to do with duplicate form names, although if you say that duplicate form element names an accessibility problem, then we may want to make a rule about that.

schiele1 commented 12 years ago

Jon has indicated that we should not worry about the name and focus on the tooltip. I'll remove the "Name" rules.