material icon indicating copy to clipboard operation
material copied to clipboard

md-icon / accesibility / validation usage with svg (i.e: https://www.google.com/design/icons/) duplicate id's issue

Open noamamit92 opened this issue 10 years ago • 2 comments

When using the same icon twice in a page the html validation fails due to 2 elements having the same ID.

Since md-icon adds the svg element with the attrbute : md-svg-icon which accepts an id as an input, Is it possible to add the svg element without it's id - so the validation error wont occur?

a codepen :

http://codepen.io/noamamit92/pen/adGjYp#0

notice that if you run the accessibility Audit using your chrome accessibility plugin you will get a duplicate id error for the g element under the svg

noamamit92 avatar Jan 21 '16 11:01 noamamit92

Please provide a CodePen or Plunkr that demonstrates this issue. Here are some starter demo templates that you can use/fork:

  • CodePen template: http://codepen.io/pen?template=bEGJdd
  • Plunkr template: http://plnkr.co/edit/yP0gB9iTacIQb48thud8?p=preview.

ThomasBurleson avatar Jan 27 '16 04:01 ThomasBurleson

I added a demo:

http://codepen.io/noamamit92/pen/adGjYp#0

noamamit92 avatar Feb 03 '16 07:02 noamamit92