arXiv:2501.03572cs.HCcs.AI2025-01被引 13

用ChatGPT生成无障碍网页,需靠精心设计提示词。

From Code to Compliance: Assessing ChatGPT's Utility in Designing an Accessible Webpage -- A Case Study

  • 通过结构化提示词+截图,提升ChatGPT识别无障碍问题能力
  • 能解决简单问题,复杂场景仍需人工多次修正
  • 适合开发者快速迭代,但不可替代专业评估

网页无障碍确保残障用户无障碍访问数字内容,但多数主流网站未达标准。本研究评估ChatGPT(GPT-4o)生成与优化符合WCAG指南网页的能力。尽管在提示下可有效修复问题,其默认代码常不合规,反映训练数据与普遍不兼容实践的局限。自动化与人工测试显示,对简单问题有优势,复杂任务则需人工监督与多轮迭代。不同于以往研究,本工作引入人工评估、动态元素及利用ChatGPT视觉推理能力,结合截图提供上下文以辅助判断对比度等设计。结果表明,如提供简洁、结构化反馈并附带视觉辅助,提示工程显著提升性能。研究揭示大型语言模型在无障碍开发中的潜力与局限,为开发者提供实用指导。

原文摘要 · Abstract (English)

Web accessibility ensures that individuals with disabilities can access and interact with digital content without barriers, yet a significant majority of most used websites fail to meet accessibility standards. This study evaluates ChatGPT's (GPT-4o) ability to generate and improve web pages in line with Web Content Accessibility Guidelines (WCAG). While ChatGPT can effectively address accessibility issues when prompted, its default code often lacks compliance, reflecting limitations in its training data and prevailing inaccessible web practices. Automated and manual testing revealed strengths in resolving simple issues but challenges with complex tasks, requiring human oversight and additional iterations. Unlike prior studies, we incorporate manual evaluation, dynamic elements, and use the visual reasoning capability of ChatGPT along with the prompts to fix accessibility issues. Providing screenshots alongside prompts enhances the LLM's ability to address accessibility issues by allowing it to analyze surrounding components, such as determining appropriate contrast colors. We found that effective prompt engineering, such as providing concise, structured feedback and incorporating visual aids, significantly enhances ChatGPT's performance. These findings highlight the potential and limitations of large language models for accessible web development, offering practical guidance for developers to create more inclusive websites.

无障碍提示工程LLM应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。