Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: title Input adds title as last-child #20

Open
sjbeatle opened this issue Jun 10, 2020 · 3 comments
Open

[Bug]: title Input adds title as last-child #20

sjbeatle opened this issue Jun 10, 2020 · 3 comments
Assignees

Comments

@sjbeatle
Copy link

When adding a title to the icon it is added to the end of the svg:

<svg>
  <path></path>
  <title></title>
</svg>

It should be first:

<svg>
  <title></title>
  <path></path>
</svg>
@cal-smith
Copy link
Contributor

Hmm 🤔 I'm not sure we have a good way to solve this at the moment ... I believe the ordering of elements comes from @carbon/icon-helpers ... I also wasn't aware that the position of elements mattered for this case, does this cause a specific functionality or accessibility violation?

@sjbeatle
Copy link
Author

sjbeatle commented Oct 1, 2020

It's been a while, but I think it had mostly to do with screenreaders not reading the title unless it was first... There may've been an issue with the tooltip feature on some browsers, as well.

Mozilla states that for compatibility it should be first.

@cal-smith
Copy link
Contributor

Huh 🤔 Interesting ... It should be a fairly easy fix (swap the appendChild for insertBefore in the title routine)

@cal-smith cal-smith self-assigned this Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants