Converts attachment items to buttons instead of links

Fixes #4681.