Incorrect search for <legend> tags

It looked for a `legend` attribute instead of the `legend` tag.