File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ defmodule Backpex.Fields.HasMany do
136
136
< div id = { @ name } >
137
137
< Layout . field_container >
138
138
<: label align = { Backpex.Field . align_label ( @ field_options , assigns ) } >
139
- < Layout . input_label text = { @ field_options [ :label ] } />
139
+ < Layout . input_label as = " span " text = { @ field_options [ :label ] } />
140
140
</: label >
141
141
< div class = "dropdown w-full " >
142
142
< label
Original file line number Diff line number Diff line change @@ -238,11 +238,11 @@ defmodule Backpex.Fields.HasManyThrough do
238
238
< div >
239
239
< Layout . field_container >
240
240
<: label align = { Backpex.Field . align_label ( @ field_options , assigns , :top ) } >
241
- < Layout . input_label text = { @ field_options [ :label ] } />
241
+ < Layout . input_label id = { "has-many-through-label- #{ @ name } " } as = " span " text = { @ field_options [ :label ] } />
242
242
</: label >
243
243
244
244
< div :if = { @ listables != [ ] } class = "ring-base-content/10 rounded-box mb-4 overflow-x-auto ring-1 " >
245
- < table class = "table " >
245
+ < table class = "table " aria-labelledby = { "has-many-through-label- #{ @ name } " } >
246
246
< thead class = "bg-base-200/50 text-base-content uppercase " >
247
247
< tr >
248
248
< th
@@ -535,7 +535,7 @@ defmodule Backpex.Fields.HasManyThrough do
535
535
~H"""
536
536
< Layout . field_container >
537
537
<: label >
538
- < Layout . input_label text = { @ label } />
538
+ < Layout . input_label for = { @ form [ @ owner_key ] } text = { @ label } />
539
539
</: label >
540
540
< BackpexForm . input
541
541
type = "select "
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ defmodule Backpex.Fields.InlineCRUD do
129
129
< div >
130
130
< Layout . field_container >
131
131
<: label align = { Backpex.Field . align_label ( @ field_options , assigns , :top ) } >
132
- < Layout . input_label text = { @ field_options [ :label ] } />
132
+ < Layout . input_label id = { "inline-crud-label- #{ @ name } " } as = " span " text = { @ field_options [ :label ] } />
133
133
</: label >
134
134
135
135
< div class = "flex flex-col " >
@@ -141,12 +141,15 @@ defmodule Backpex.Fields.InlineCRUD do
141
141
:for = { { child_field_name , child_field_options } <- @ child_fields }
142
142
class = { child_field_class ( child_field_options , assigns ) }
143
143
>
144
- < p :if = { f_nested . index == 0 } class = "mb-1 text-xs " >
145
- { child_field_options . label }
146
- </ p >
144
+ < span
145
+ :if = { f_nested . index == 0 }
146
+ id = { "inline-crud-header-label-#{ @ name } -#{ child_field_name } " }
147
+ class = "mb-1 text-xs "
148
+ >
147
149
< BackpexForm . input
148
150
type = { input_type ( child_field_options ) |> Atom . to_string ( ) }
149
151
field = { f_nested [ child_field_name ] }
152
+ aria-labelledby = { "inline-crud-header-label-#{ @ name } -#{ child_field_name } inline-crud-label-#{ @ name } " }
150
153
translate_error_fun = { Backpex.Field . translate_error_fun ( child_field_options , assigns ) }
151
154
phx-debounce = { Backpex.Field . debounce ( child_field_options , assigns ) }
152
155
phx-throttle = { Backpex.Field . throttle ( child_field_options , assigns ) }
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ defmodule Backpex.Fields.MultiSelect do
143
143
< div id = { @ name } >
144
144
< Layout . field_container >
145
145
<: label align = { Backpex.Field . align_label ( @ field_options , assigns ) } >
146
- < Layout . input_label text = { @ field_options [ :label ] } />
146
+ < Layout . input_label as = " span " text = { @ field_options [ :label ] } />
147
147
</: label >
148
148
< Form . multi_select
149
149
field = { @ form [ @ name ] }
You can’t perform that action at this time.
0 commit comments