Skip to content

[Bug] duplicate id=0 on multiple svg charts #18194

@frankliu197

Description

@frankliu197

Version

5.3.2

Link to Minimal Reproduction

https://codesandbox.io/embed/polished-monad-v0vopl?fontsize=14&hidenavigation=1&theme=dark

Steps to Reproduce

Inspect the html construct of the two graphs and see the following
image

Both graphs have a rect element with an ID of 0.

Current Behavior

If you create more than one graphs on the same page, there will be duplicate html tags with the same ID. The id attribute should be unique to provide machine-readable identifier for elements on the page. More on this accessibility issue:
https://www.w3.org/WAI/WCAG21/Techniques/html/H93
https://www.w3.org/WAI/WCAG21/Techniques/failures/F77
https://www.ibm.com/able/requirements/requirements/#4_1_1
Is it necessary to put an ID on the rect tag?

Expected Behavior

All IDs should be unique.

Environment

https://codesandbox.io/embed/polished-monad-v0vopl?fontsize=14&hidenavigation=1&theme=dark

Any additional comments?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions