@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
33import { getSourceURL } from "../../../../utils/embeddedCodeUtils" ;
44import ButtonLikeAnchor from "../../../shared/ButtonLikeAnchor" ;
55import BaseButton from "../../../shared/BaseButton" ;
6+ import { ParseKeys } from "i18next" ;
67
78/**
89 * This component renders the embedding code modal
@@ -82,39 +83,56 @@ const EmbeddingCodeModal = ({
8283 return (
8384 < >
8485 { /* embed size buttons */ }
86+ < div className = "list-obj" >
87+ < div className = "obj-container" >
88+ < span >
89+ { t ( "EMBEDDING_CODE.DESCRIPTION" ) }
90+ </ span >
91+ </ div >
92+ </ div >
8593 < div className = "embedded-code-boxes" >
8694 < ButtonLikeAnchor
8795 id = "620x349"
8896 className = "embedSizeButton size_620x349"
89- onClick = { ( e ) => updateTextArea ( e ) }
97+ onClick = { e => updateTextArea ( e ) }
98+ tooltipText = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "620x349" } ) as ParseKeys }
99+ aria-label = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "620x349" } ) as ParseKeys }
90100 >
91101 < span className = "span-embedded-code" > 620x349</ span >
92102 </ ButtonLikeAnchor >
93103 < ButtonLikeAnchor
94104 id = "540x304"
95105 className = "embedSizeButton size_540x304"
96- onClick = { ( e ) => updateTextArea ( e ) }
106+ onClick = { e => updateTextArea ( e ) }
107+ tooltipText = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "540x304" } ) as ParseKeys }
108+ aria-label = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "540x304" } ) as ParseKeys }
97109 >
98110 < span className = "span-embedded-code" > 540x304</ span >
99111 </ ButtonLikeAnchor >
100112 < ButtonLikeAnchor
101113 id = "460x259"
102114 className = "embedSizeButton size_460x259"
103- onClick = { ( e ) => updateTextArea ( e ) }
115+ onClick = { e => updateTextArea ( e ) }
116+ tooltipText = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "460x259" } ) as ParseKeys }
117+ aria-label = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "460x259" } ) as ParseKeys }
104118 >
105119 < span className = "span-embedded-code" > 460x259</ span >
106120 </ ButtonLikeAnchor >
107121 < ButtonLikeAnchor
108122 id = "380x214"
109123 className = "embedSizeButton size_380x214"
110- onClick = { ( e ) => updateTextArea ( e ) }
124+ onClick = { e => updateTextArea ( e ) }
125+ tooltipText = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "380x214" } ) as ParseKeys }
126+ aria-label = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "380x214" } ) as ParseKeys }
111127 >
112128 < span className = "span-embedded-code" > 380x214</ span >
113129 </ ButtonLikeAnchor >
114130 < ButtonLikeAnchor
115131 id = "300x169"
116132 className = "embedSizeButton size_300x169"
117- onClick = { ( e ) => updateTextArea ( e ) }
133+ onClick = { e => updateTextArea ( e ) }
134+ tooltipText = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "300x169" } ) as ParseKeys }
135+ aria-label = { t ( "EMBEDDING_CODE.GENERATE_TOOLTIP" , { size : "300x169" } ) as ParseKeys }
118136 >
119137 < span className = "span-embedded-code" > 300x169</ span >
120138 </ ButtonLikeAnchor >
@@ -132,6 +150,7 @@ const EmbeddingCodeModal = ({
132150 rows = { 2 }
133151 value = { textAreaContent }
134152 cols = { 1 }
153+ aria-label = { t ( "EMBEDDING_CODE.EMBEDD_CODE_TEXTAREA_ARIA" ) }
135154 />
136155 </ div >
137156
@@ -151,6 +170,8 @@ const EmbeddingCodeModal = ({
151170 className = "cancel-btn"
152171 style = { { fontSize : "14px" } }
153172 onClick = { ( ) => copy ( ) }
173+ tooltipText = "EMBEDDING_CODE.COPY_BUTTON_TOOLTIP"
174+ aria-label = { t ( "EMBEDDING_CODE.COPY_BUTTON_TOOLTIP" ) }
154175 >
155176 { t ( "COPY" ) }
156177 </ BaseButton >
0 commit comments