diff --git a/lib/classes/hook/access/after_role_assigned.php b/lib/classes/hook/access/after_role_assigned.php
index 3850854dd53..c13f76b7e10 100644
--- a/lib/classes/hook/access/after_role_assigned.php
+++ b/lib/classes/hook/access/after_role_assigned.php
@@ -26,7 +26,7 @@ use context;
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 #[\core\attribute\label('Allows plugins or features to perform actions after a role is assigned to a user.')]
-#[\core\attribute\tags('role,', 'user')]
+#[\core\attribute\tags('role', 'user')]
 class after_role_assigned {
 
     /**
diff --git a/lib/classes/hook/access/after_role_unassigned.php b/lib/classes/hook/access/after_role_unassigned.php
index 1dd5d8591c9..905ffa6e284 100644
--- a/lib/classes/hook/access/after_role_unassigned.php
+++ b/lib/classes/hook/access/after_role_unassigned.php
@@ -26,7 +26,7 @@ use context;
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 #[\core\attribute\label('Allows plugins or features to perform actions after a role is unassigned for a user.')]
-#[\core\attribute\tags('role,', 'user')]
+#[\core\attribute\tags('role', 'user')]
 class after_role_unassigned {
 
     /**