Re #2976 Allow `id` values to be generated from a function given attrs