Describe the problem
Currently, passing an array to ARIA attributes in Svelte (e.g., aria-describedby, aria-labelledby, etc.) results in a comma-separated string ("id1,id2"). However, per ARIA spec, multiple IDs should be space-separated ("id1 id2").
The following code:
<input aria-describedby={["id1", "id2"]} />
Should render as:
<input aria-describedby="id1 id2">
But it renders as:
<input aria-describedby="id1,id2">
Affected Attributes
aria-describedby
aria-labelledby
aria-owns
- Any ARIA attribute accepting multiple IDs
Describe the proposed solution
When an array is passed to ARIA attributes, join values with a space instead of a comma.
Would love to hear thoughts on this! Thanks! 🙌
Importance
would make my life easier