swagger-api / swagger-api/swagger-ui

Name property is not defined for the 'Copy' button present in code in Windows.

Open
#10,319 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A (please complete the following information)
  • OS: Windows 11 24H2
  • Browser: Edge, chrome
  • Version: 133.0.3065.82 (Official build) (64-bit)
  • Method of installation: dist
  • Swagger-UI version: 5.17.14
  • Swagger/OpenAPI version: 3.0
Content & configuration

Example Swagger/OpenAPI definition:

# your YAML here

Swagger-UI configuration options:

SwaggerUI({
  // your config options here
})
?yourQueryStringConfig
Describe the bug you're encountering

Name property is not defined for the 'Copy' button present in code in Windows. when focus is on the control it is narrating as "button".
The lack of a defined name property for the 'Copy' button in code in Windows can greatly affect users who rely on screen readers, such as those with visual impairments. This issue makes it challenging for them to identify the button's function, resulting in confusion and difficulty in using the feature effectively.

To reproduce...

Steps to reproduce the behavior:

  1. Open the URL: Swagger UI v5.17.14 in the latest edge browser.
  2. Press tab key to move to the 'Put' drop down control and activated it.
  3. Press tab key to move to the 'try it out' button and activate it.
  4. Press tab key to move to the 'execute' button and activate it. 'code' will be displayed.
  5. Press tab key to move to the 'Copy' button in the code.
  6. Verify whether name property is defined for the 'Copy' button present in code in Windows.
Expected behavior

Name property should be defined for the 'Copy' button present in code in Windows. When focus is on the control screen reader should announce as "copy button".

Screenshots

https://github.com/user-attachments/assets/0265a6ec-8064-40b6-bb12-68cd1b9537e6
Image

Additional context or thoughts

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the linked Swagger UI v5.17.14 CodePen in Edge or Chrome on Windows 11, following the listed keyboard steps to reach the Copy button in the displayed code. Inspect the button's accessible name and verify that a screen reader announces it as "copy button" when the fix is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.