CoChat

Does ChatGPT Generate Accessible Code? Investigating Accessibility Challenges in LLM-Generated Source Code

Aljedaani, Wajdi, Habib, Abdulrahman, Aljohani, Ahmed, Eler, Marcelo, Feng, Yunhe · 2024 · Proceedings of the 21st International Web for All Conference

The DOI matches its Crossref record; 27 of the 27 references it cites were found in a registry or an index.

Abstract

Context. Large Language Models (LLMs) such as GPT-3.5 show great promise in generating source code based on natural language descriptions, which could significantly facilitate web development. However, the level of accessibility in generated code by these models is still unexplored. Objective. We empirically evaluate the accessibility of the web code produced by ChatGPT and its ability to fix accessibility violations in two contexts: its own generated code and open-source web code extracted from GitHub. Method. A total of 88 web developers used natural language descriptions to prompt ChatGPT to create websites with diverse characteristics and web elements. Such websites were assessed by two well-known accessibility checker tools, and ChatGPT was prompted to fix the accessibility violations found. Finally, the model was used to address accessibility violations in different open-source projects from GitHub. Result. The majority of websites (84%) generated by ChatGPT exhibited many accessibility problems. While the model demonstrates strength in adhering to certain accessibility guidelines, it struggles with specific aspects related to established accessibility principles. ChatGPT achieved a 70% success rate in rectifying the accessibility violations within its generated source code and a 73% success rate in fixing accessibility issues within third-party open-source project code. These findings can help developers to understand potential areas requiring intervention to ensure website inclusivity.

Overview

Integrity signals

Registry

Crossref · 10.1145/3677846.3677854

Cites

27 of 27 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Verification

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

3 more claims about this paper

Create a free account to see every claim other papers make about this one.

See all claims — free account

Citations

Cites

Research works printed but not linked: 15

  1. 2023. Stack Overflow Developer Survey 2023. https://survey.stackoverflow.co/2023/
  2. Josh Achiam Steven Adler Sandhini Agarwal Lama Ahmad Ilge Akkaya Florencia Leoni Aleman Diogo Almeida Janko Altenschmidt Sam Altman Shyamal Anadkat et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774 (2023). · arXiv
  3. Jinat ARAa and SL Cecilia. 2022. Artificial intelligence in web accessibility: potentials and possible challenges. Proceedings of IAC (2022) 173.
  4. Tom Brown Benjamin Mann Nick Ryder Melanie Subbiah Jared D Kaplan Prafulla Dhariwal Arvind Neelakantan Pranav Shyam Girish Sastry Amanda Askell et al. 2020. Language models are few-shot learners. Advances in neural information processing systems 33 (2020) 1877–1901.
  5. Mark Chen Jerry Tworek Heewoo Jun Qiming Yuan Henrique Ponde de Oliveira Pinto Jared Kaplan Harri Edwards Yuri Burda Nicholas Joseph Greg Brockman et al. 2021. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374 (2021). · arXiv
  6. Matjaž Debevc Tilen Škraba Bogdan Cerovac Ines Kožuh and Nataša Rajh. 2023. Monitoring website accessibility: Evaluating current approaches and a proposal for improvements. Journal of Accessibility and Design for All 13 2 (2023) 162–187.
  7. Marc Dillmann Julien Siebert and Adam Trendowicz. 2024. Evaluation of large language models for assessing code maintainability. arxiv:2401.12714 [cs.SE] · arXiv
  8. Barbara Leporini and Fabio Paternò. 2002. Criteria for usability of accessible web sites. In ERCIM Workshop on User Interfaces for All. Springer, 43–55.
  9. Rangeet Pan Ali Reza Ibrahimzada Rahul Krishna Divya Sankar Lambert Pouguem Wassi Michele Merler Boris Sobolev Raju Pavuluri Saurabh Sinha and Reyhaneh Jabbarvand. 2023. Understanding the effectiveness of large language models in code translation. arXiv preprint arXiv:2308.03109 (2023). · arXiv
  10. Baptiste Roziere Jonas Gehring Fabian Gloeckle Sten Sootla Itai Gat Xiaoqing Ellen Tan Yossi Adi Jingyu Liu Tal Remez Jérémy Rapin et al. 2023. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950 (2023). · arXiv
  11. Fardin Ahsan Sakib Saadat Hasan Khan and AHM Karim. 2023. Extending the frontier of chatgpt: Code generation and debugging. arXiv preprint arXiv:2307.08260 (2023). · arXiv
  12. Claudio Spiess David Gros Kunal Suresh Pai Michael Pradel Md Rafiqul Islam Rabin Amin Alipour Susmit Jha Prem Devanbu and Toufique Ahmed. 2024. Quality and Trust in LLM-generated Code. arxiv:2402.02047 [cs.SE] · arXiv
  13. WebAIM. 2023. WebAIM Million - The 2023 report on the accessibility of the top 1,000,000 home pages. https://webaim.org/projects/million/
  14. Chunqiu Steven Xia and Lingming Zhang. 2023. Keep the Conversation Going: Fixing 162 out of 337 bugs for $0.42 each using ChatGPT. arXiv preprint arXiv:2304.00385 (2023). · arXiv
  15. Quanjun Zhang Tongke Zhang Juan Zhai Chunrong Fang Bowen Yu Weisong Sun and Zhenyu Chen. 2023. A critical review of large language model on software engineering: An example from chatgpt and automated program repair. arXiv preprint arXiv:2310.08879 (2023). · arXiv

Cited by

See all 71

Metadata

Authors
Aljedaani, W., Habib, A., Aljohani, A., Eler, M., & Feng, Y.
Affiliations
  • University of North Texas (US)
  • Saudi Data and Artificial Intelligence Authority, Riyadh, Saudi Arabia
  • Universidade de São Paulo (BR)
Venue
Proceedings of the 21st International Web for All Conference
Publisher
ACM
Published
2024-05-13
Pages
165-176
OpenAlex
W4403624926
Cited by
42
References
23
Citations by year
2026: 20 · 2025: 21 · 2024: 1
FWCI
15.96
Type
conference paper
Language
en
Open access
closed
Locations
International Web for All Conference (W4A) (publishedVersion)
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Social Sciences › Human Factors and Ergonomics › Digital Accessibility for Disabilities
  • Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
Keywords
ChatGPT, large language models, LLM-generated code, accessibility, code quality

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.