When using the WebHint VSCode extension with React code, I often have this false positive issue:
Buttons must have discernible text: Element has no title attribute
webhint(axe/name-role-value)
With JSX such as:
function MyButton({ labelId, onClick }) {
return (
<button type="button" onClick={onClick}>
<FormattedMessage id={labelId} />
</button>
);
}
Is there a way to make WebHint treat <FormatedMessage>
as a proper label?