File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ const Asset: React.FC<{
45
45
if ( block . value . type === "image" ) {
46
46
const src = mapImageUrl ( value . properties . source [ 0 ] [ 0 ] , block ) ;
47
47
const caption = value . properties . caption ?. [ 0 ] [ 0 ] ;
48
+ const altText = value . properties . alt_text ?. [ 0 ] [ 0 ] ;
48
49
49
50
if ( block_aspect_ratio ) {
50
51
return (
@@ -56,7 +57,7 @@ const Asset: React.FC<{
56
57
>
57
58
< img
58
59
className = "notion-image-inset"
59
- alt = { caption || "notion image" }
60
+ alt = { altText || caption || "notion image" }
60
61
src = { src }
61
62
/>
62
63
</ div >
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ export interface ContentValueType extends BaseValueType {
197
197
properties : {
198
198
source : string [ ] [ ] ;
199
199
caption ?: DecorationType [ ] ;
200
+ alt_text ?: string [ ] [ ] ;
200
201
} ;
201
202
format ?: {
202
203
block_width : number ;
You can’t perform that action at this time.
0 commit comments