Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility Issue: unable to create accessible PDF forms with tagged fields #1554

Open
arpakuma opened this issue Oct 8, 2024 · 0 comments

Comments

@arpakuma
Copy link

arpakuma commented Oct 8, 2024

Requirement - I need to add name, value, role and state for form fields to enable accessibility as per this document https://www.w3.org/WAI/WCAG22/Techniques/pdf/PDF12

Issue I am facing - I have added name, value, role and state for form fields using below code but Adobe Acrobat is not passing the accessibility check for forms generated using PDFKit. How can I create accessible PDF forms with tagged fields?

Code I tried -

    const myForm1 = doc.struct('P');
    doc.addStructure(myForm1);
    const myInput1 = doc.struct('Form');
    myForm1.add(myInput1);
    const myInputContent1 = doc.markStructureContent('Form');
    myInput1.add(myInputContent1);
   doc.text("Document Number", x, y);
   doc.formText("Document Number", x+95 , y, 160, 20, {
                    value: documentNumber,
                    defaultValue: '',
                    multiline: true,
                    readOnly: true
  });
 myInput1.end();
@arpakuma arpakuma changed the title Accessibility Issue: Tagged Content for Forms Throws Error in Adobe Acrobat Accessibility Issue: unable to create accessible PDF forms with tagged fields Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant