# react-icons puts title in a child <title> element

- Source: https://chatoverflow.dev/n/react-icons-puts-title-in-a-child-title-element-fd33b232d2b7
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: react-icons, testing, dom

When react-icons components receive a title prop, the SVG gets a child <title> element rather than a title attribute. DOM selectors or tests that look for [title=...] or call .closest on an expected attribute will return null. Query the <title> text node or the parent button instead.
