Finish migrating attribute syntax

This is the rebasing of #13068 with a fix for #13067 as the first commit.