File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 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<{
4545 if ( block . value . type === "image" ) {
4646 const src = mapImageUrl ( value . properties . source [ 0 ] [ 0 ] , block ) ;
4747 const caption = value . properties . caption ?. [ 0 ] [ 0 ] ;
48+ const altText = value . properties . alt_text ?. [ 0 ] [ 0 ] ;
4849
4950 if ( block_aspect_ratio ) {
5051 return (
@@ -56,7 +57,7 @@ const Asset: React.FC<{
5657 >
5758 < img
5859 className = "notion-image-inset"
59- alt = { caption || "notion image" }
60+ alt = { altText || caption || "notion image" }
6061 src = { src }
6162 />
6263 </ div >
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ export interface ContentValueType extends BaseValueType {
197197 properties : {
198198 source : string [ ] [ ] ;
199199 caption ?: DecorationType [ ] ;
200+ alt_text ?: string [ ] [ ] ;
200201 } ;
201202 format ?: {
202203 block_width : number ;
You can’t perform that action at this time.
0 commit comments