I have the "Missing required 'title' element" inspection enabled under Editor > Inspections > HTML > Accessibility.
However, PhpStorm (currently on v2021.2) doesn't seem to know the difference between a React element (<Head />
) and a regular HTML element (<head></head>
) in this case:
This is inside of a .tsx
file. Is there a way to ensure this inspection only runs on actual HTML elements instead of React elements?
Please follow WEB-52091 for updates. For now, I can only suggest suppressing the inspection for file by adding
// noinspection HtmlRequiredTitleElement
at the top of it;
Or, you can create a custom scope in Settings | Appearance & Behavior | Scopes with only .html
files included and specify this scope for HTML | Accessibility | Missing required 'title' element inspection