svg-inject icon indicating copy to clipboard operation
svg-inject copied to clipboard

Consider `aria-labelledby` and `aria-describedby` when making IDs unique.

Open waruyama opened this issue 3 years ago • 1 comments

The attributes aria-labelledby and aria-describedby can be used to enhance accessibility for SVG elements. For both the value consists of a space separated list of element IDs. Currently these IDs are not changed when we make IDs unique. As a result the IDs are no longer in the DOM, so the attributes do not work anymore. We should make the IDs in these attribute values unique, too.

aria-labelledby' and aria-describedby` on MSN web-docs: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-labelledby_attribute https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute

waruyama avatar May 23 '21 08:05 waruyama

There are other ARIA attributes that have IDs references or ID reference lists as values, for example aria-flowto, aria-owns, aria-controls, aria-errormessage, aria-details.

More details at https://www.w3.org/TR/wai-aria

waruyama avatar May 23 '21 08:05 waruyama