Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

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

Closed
NoamaExl opened this issue Jan 21, 2016 · 2 comments
Labels
a11y This issue is related to accessibility resolution: fixed
Milestone

Comments

@NoamaExl
Copy link

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

@ThomasBurleson
Copy link
Contributor

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

@ThomasBurleson ThomasBurleson added the needs: demo A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue label Jan 27, 2016
@ThomasBurleson ThomasBurleson added this to the Backlog milestone Jan 27, 2016
@NoamaExl
Copy link
Author

NoamaExl commented Feb 3, 2016

I added a demo:

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

david-gang added a commit to david-gang/material that referenced this issue Mar 7, 2016
@devversion devversion added a11y This issue is related to accessibility and removed needs: demo A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue labels Mar 7, 2016
david-gang added a commit to david-gang/material that referenced this issue Mar 7, 2016
We remove also recursively the descendants ids.
ThomasBurleson pushed a commit that referenced this issue Apr 1, 2016
*  When the same svg icon is placed multiple times in the same page, it raises an aria warning that every element should have an unique id.

fixes #6796. closes #7440.
@Splaktar Splaktar modified the milestones: - Backlog, 1.1.0 Aug 2, 2018
@Splaktar Splaktar modified the milestones: 1.1.0, 1.0.7 Oct 23, 2018
@angular angular locked as resolved and limited conversation to collaborators Oct 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This issue is related to accessibility resolution: fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants