Skip to content

Commit 947748b

Browse files
ahtesham-quraishAhtesham Quraish
andauthored
fix: use semantic figure and caption tags (#2826)
* fix: use semantic figure and caption tags --------- Co-authored-by: Ahtesham Quraish <[email protected]>
1 parent 4cec570 commit 947748b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

frontends/ol-components/src/components/TiptapEditor/extensions/node/Image/ImageWithCaption.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const ARTICLE_MAX_WIDTH = 890
1111
const CONTAINER_PADDING = 24
1212
const WIDE_LAYOUT_MIN_IMG_WIDTH = 900
1313

14-
const Container = styled.div(({ theme }) => ({
14+
const Container = styled.figure(({ theme }) => ({
1515
position: "relative",
1616
margin: "2rem auto",
1717
textAlign: "center",
@@ -148,7 +148,7 @@ const Image = styled.img<{ layout: Layout }>(({ layout }) => ({
148148
},
149149
}))
150150

151-
const Caption = styled.p(({ theme }) => ({
151+
const Caption = styled.figcaption(({ theme }) => ({
152152
"&&&&&": {
153153
...theme.typography.body2,
154154
color: theme.custom.colors.silverGrayDark,

frontends/ol-components/src/components/TiptapEditor/extensions/node/MediaEmbed/MediaEmbedNodeView.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ const StyledNodeViewWrapper = styled(NodeViewWrapper)<{
3333
input {
3434
width: 100%;
3535
border: none;
36-
text-align: center;
36+
text-align: left;
3737
outline: none;
38-
padding: 4px;
38+
padding: 16px 0;
3939
font-size: 14px;
40+
border-bottom: 1px solid #dde1e6;
4041
}
4142
4243
p {

0 commit comments

Comments
 (0)