If the text attribute is set, use that instead of the value