DPAF: A lifecycle-integrated framework for dark pattern mitigation with quantitative audit metrics
Dark patterns, also known as deceptive design practices, pose significant ethical, legal, and usability challenges in modern web systems. Existing mitigation approaches remain fragmented and are rarely integrated into software development workflows. In this paper, we present DPAF, a lifecycle-integrated framework for dark pattern mitigation based on three quantitative audit metrics, the Dark Pattern Risk Score (DPRS), the Autonomy Preservation Score (APS), and the Transparency Deficit Score (TDS). Our framework integrates automated detection, autonomy assessment, and transparency auditing into a unified workflow spanning requirements analysis, design, development, deployment, and monitoring. To evaluate its feasibility, we have conducted three complementary studies. First, a detection benchmark using a fine-tuned RoBERTa model augmented with contextual rules achieved competitive performance on a public dark-pattern dataset, reaching an accuracy of 0.982, F1-score of 0.978, and AUC of 0.994. Second, a platform audit involving 15 commercial interfaces and DPAF-guided redesigned prototypes provided initial construct-validity evidence, demonstrating strong correlations between the proposed metrics and subjective user perceptions of autonomy and transparency. Third, a usability study with 120 participants showed substantial improvements in trust, perceived autonomy, transparency, usability, and decision confidence for DPAF-guided interfaces compared with commercial controls. Sensitivity analysis further confirmed robustness under parameter perturbations. DPAF contributes a practitioner-oriented and auditable foundation for ethical web design by operationalizing dark pattern detection and mitigation within a lifecycle-integrated quantitative framework.