Problem/Motivation

Add a feature that adds validation to prevent saving content with PDFs that fail accessibility scans, while allowing authorized users to bypass with a required written justification for audit purposes. Existing files will only require justification when edited.

Steps to reproduce

Proposed resolution

Remaining tasks

  1. Add field-level blocking configuration
  2. Create bypass permission and file field
  3. Implement server-side validation
  4. Enhance PdfFileWidget
  5. Update JavaScript for real-time UX
  6. Create Views-based audit report

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nicholass created an issue. See original summary.

nicholass’s picture

StatusFileSize
new118.78 KB

This new feature can block updating content when a pdf file fails accessibility checks. The justification has a permission to scope the ability to bypass to selected users/roles.
asf

nicholass’s picture

Status: Active » Needs review

nicholass’s picture

Title: Block Form Saving on Failed PDF Accessibility with Required Bypass Justification » Feature to Block new file uploads for ADA failures with Bypass permission and feature.

Version 2 - Has a slightly different approach after testing the initial branch we found some issues and edge cases on our site, and this new approach corrects those. Instead of blocking the save, this explicitly only prevents new file uploads if errors are found, so that way past content can be archived, or edited or moved through workflow. It also less client side code. The first approach was honestly due to time constraints, this branch is I think the more drupal way to accomplish the goals.

nicholass’s picture

StatusFileSize
new100.02 KB
new355.34 KB
new115.2 KB

For users with the bypass permission, they can enter justifications to bypass the upload restriction. This field setting can be individually set for various fields.

screenshot

For lower privilege users they can see past justifications when editing, but not enter new one, or bypass (note they need the permission to check files)
screenshot
They also should not be able to save if errors in the file since they lack the bypass permission
can't save

nicholass’s picture

Status: Needs review » Reviewed & tested by the community
nicholass’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.