diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 4d361f5..302f8ae 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -1373,7 +1373,7 @@ public class Vala.GIRWriter : CodeVisitor {
 				}
 
 				write_indent ();
-				buffer.append_printf ("<annotation key=\"%s.%s\" value=\"%s\"/>\n",
+				buffer.append_printf ("<attribute name=\"%s.%s\" value=\"%s\"/>\n",
 					name, camel_case_to_canonical (arg_name), value);
 			}
 		}
