@@ -17,16 +17,20 @@ export async function UserPage() {
17
17
const {
18
18
var : { user } ,
19
19
} = usePageRequestContext ( ) ;
20
+ const $organizations_describedby = hyper_ref ( "user_organizations" ) ;
21
+ const $moderations_describedby = hyper_ref ( "user_moderations" ) ;
22
+
20
23
const hx_get_user_organizations_props = await hx_urls . users [
21
24
":id"
22
25
] . organizations . $get ( {
23
26
param : { id : user . id . toString ( ) } ,
24
- query : { describedby : hyper_ref ( ) , page_ref : hyper_ref ( ) } ,
27
+ query : { describedby : $organizations_describedby , page_ref : hyper_ref ( ) } ,
25
28
} ) ;
26
29
const hx_get_user_moderations_props = await hx_urls . users [
27
30
":id"
28
31
] . moderations . $get ( {
29
32
param : { id : user . id . toString ( ) } ,
33
+ query : { describedby : $moderations_describedby } ,
30
34
} ) ;
31
35
32
36
return (
@@ -49,27 +53,28 @@ export async function UserPage() {
49
53
</ div >
50
54
< hr />
51
55
< div class = "fr-container" >
52
- < b > { user . given_name } </ b > est enregistré(e) dans les organisations
53
- suivantes :
56
+ < h1 id = { $organizations_describedby } >
57
+ Liste des organisations de { user . given_name }
58
+ </ h1 >
54
59
< div class = "fr-table max-w-full overflow-x-auto" >
55
60
< div
56
61
{ ...hx_get_user_organizations_props }
57
62
hx-target = "this"
58
63
hx-trigger = "load"
59
64
class = "fr-table"
60
- id = "table-user-organisations"
61
65
> </ div >
62
66
</ div >
63
67
< hr />
64
- < b > { user . given_name } </ b > est enregistré(e) dans les modérations
65
- suivantes :
68
+ < h1 id = { $moderations_describedby } >
69
+ Liste des modérations de { user . given_name }
70
+ </ h1 >
71
+
66
72
< div class = "fr-table max-w-full overflow-x-auto" >
67
73
< div
68
74
{ ...hx_get_user_moderations_props }
69
75
hx-target = "this"
70
76
hx-trigger = "load"
71
77
class = "fr-table"
72
- id = "table-user-organisations"
73
78
> </ div >
74
79
</ div >
75
80
</ div >
@@ -79,8 +84,8 @@ export async function UserPage() {
79
84
</ div >
80
85
</ div >
81
86
< hr />
82
- < div class = "fr-container py-6" >
83
- < h1 > 🔓 MFA</ h1 >
87
+ < div aria-describedby = "mfa" class = "fr-container py-6" >
88
+ < h1 id = "mfa" > 🔓 MFA</ h1 >
84
89
< MFA />
85
90
</ div >
86
91
< hr />
@@ -100,10 +105,13 @@ async function MFA() {
100
105
if ( ! hasMFA ) {
101
106
return < p > L'utilisateur n'a pas de MFA configurée.</ p > ;
102
107
}
108
+
103
109
return (
104
110
< div className = "grid grid-cols-2 gap-4" >
105
- < div class = "fr-card p-6!" >
106
- < h2 class = "text-(--text-action-high-blue-france)" > TOTP</ h2 >
111
+ < div aria-describedby = "totp" class = "fr-card p-6!" >
112
+ < h2 class = "text-(--text-action-high-blue-france)" id = "totp" >
113
+ TOTP
114
+ </ h2 >
107
115
< p class = "mb-1" >
108
116
< b > TOTP enrôlé le :</ b > { user . totp_key_verified_at }
109
117
</ p >
@@ -113,8 +121,14 @@ async function MFA() {
113
121
</ p >
114
122
</ div >
115
123
{ authenticators . map ( ( authenticator ) => (
116
- < div class = "fr-card p-6!" >
117
- < h2 class = "text-(--text-action-high-blue-france)" >
124
+ < div
125
+ aria-describedby = { `passkey-${ authenticator . credential_id } ` }
126
+ class = "fr-card p-6!"
127
+ >
128
+ < h2
129
+ class = "text-(--text-action-high-blue-france)"
130
+ id = { `passkey-${ authenticator . credential_id } ` }
131
+ >
118
132
Passkey - { authenticator . display_name }
119
133
</ h2 >
120
134
< p class = "mb-1" >
0 commit comments