Issue #3270549 by RenatoG: Isolate a method to add attributes on block instead of long structural code