diff --git a/AUTHORS.md b/AUTHORS.md
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -140,6 +140,7 @@
 - Gavin Beatty
 - George Stagg
 - Georgi Lyubenov
+- GHyman83
 - Gokul Rajiv
 - Gordon Woodhull
 - Gottfried Haider
diff --git a/MANUAL.txt b/MANUAL.txt
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1,7 +1,7 @@
 ---
 title: Pandoc User's Guide
 author: John MacFarlane
-date: 2025-05-17
+date: 2025-05-28
 ---
 
 # Synopsis
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,59 @@
 # Revision history for pandoc
 
+## pandoc 3.7.0.2 (2025-05-28)
+
+  * RST writer:
+
+    + Don't emit alignment markers in grid tables (#10857).
+
+  * Asciidoc writer:
+
+    + Add support for sidebars (GHyman83).
+
+  * LaTeX writer:
+
+    + Include alt option in `\includegraphics` (#6095).
+
+  * Markdown writer:
+
+    + Preserve figure attributes (Nikolay Yakimov, #10867).
+      Fixes a regression introduced by 0d2114e, which caused the
+      Markdown writer to ignore attributes on the figure if it
+      has class or key-value attributes set.
+
+  * HTML writer:
+
+    + Use the ID prefix in the ID for the footnotes section (Benjamin Esham).
+
+  * Text.Pandoc.Writers.Shared:
+
+    + `gridTable`: fix (3.7) regression with missing cell alignments (#10853).
+    + `gridTable`: fix headings with colspans (#10855). If the heading
+      contains a colspan, we still need to include information in the header
+      line about the colspecs.
+    + `gridTable`: fix headerless tables. The top line should encode
+      colspan information.
+
+  * Text.Pandoc.SelfContained:
+
+    + Fix handling of empty script element (#10862). Previously in this
+      case the closing tag was dropped.
+    + Do not drop `data-` attributes in script tags (#10861).
+
+  * Lua subsystem (Albert Krewinkel):
+
+    + Add function `pandoc.mediabag.make_data_uri` (#10876).
+      The function takes a MIME type and raw data from which it creates an
+      RFC 2397 data URI.
+
+  * `tools/update-lua-module-docs`: fix handling of wikilinks
+    (Albert Krewinkel).
+
+  * `doc/lua-filters.md`: add missing docs for `pandoc.Caption`
+    (Albert Krewinkel).
+
+  * Require texmath 0.12.10.3, typst 0.8.0.1
+
 ## pandoc 3.7.0.1 (2025-05-17)
 
   * Text.Pandoc.Shared.Writer:  Fix numerous problems with `gridTable` and add
diff --git a/pandoc.cabal b/pandoc.cabal
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -1,6 +1,6 @@
 cabal-version:   2.4
 name:            pandoc
-version:         3.7.0.1
+version:         3.7.0.2
 build-type:      Simple
 license:         GPL-2.0-or-later
 license-file:    COPYING.md
@@ -536,7 +536,7 @@
                  syb                   >= 0.1      && < 0.8,
                  tagsoup               >= 0.14.6   && < 0.15,
                  temporary             >= 1.1      && < 1.4,
-                 texmath               >= 0.12.10.2 && < 0.13,
+                 texmath               >= 0.12.10.3 && < 0.13,
                  text                  >= 1.1.1.0  && < 2.2,
                  text-conversions      >= 0.3      && < 0.4,
                  time                  >= 1.5      && < 1.15,
@@ -547,7 +547,7 @@
                  zip-archive           >= 0.4.3.1  && < 0.5,
                  zlib                  >= 0.5      && < 0.8,
                  xml                   >= 1.3.12   && < 1.4,
-                 typst                 >= 0.8      && < 0.9,
+                 typst                 >= 0.8.0.1  && < 0.9,
                  vector                >= 0.12     && < 0.14,
                  djot                  >= 0.1.2.2  && < 0.2,
                  tls                   >= 2.0.1    && < 2.2,
diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs
--- a/src/Text/Pandoc/SelfContained.hs
+++ b/src/Text/Pandoc/SelfContained.hs
@@ -90,7 +90,7 @@
       ((t:xs') ++) <$> convertTags rest
 convertTags (t@(TagOpen "script" as):tc@(TagClose "script"):ts) =
   case fromAttrib "src" t of
-       ""  -> (t:) <$> convertTags ts
+       ""  -> ([t, tc] ++) <$> convertTags ts
        src -> do
            let typeAttr = fromAttrib "type" t
            res <- getData typeAttr src
@@ -105,7 +105,9 @@
                      "application/x-javascript" `T.isPrefixOf` mime) &&
                      not ("</script" `B.isInfixOf` bs) ->
                      return $
-                       TagOpen "script" [("type", typeAttr)|not (T.null typeAttr)]
+                       TagOpen "script" [(k,v) | (k,v) <- as
+                                               , k == "type" ||
+                                                 "data-" `T.isPrefixOf` k]
                        : TagText (toText bs)
                        : TagClose "script"
                        : rest
diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs
--- a/src/Text/Pandoc/Writers/AsciiDoc.hs
+++ b/src/Text/Pandoc/Writers/AsciiDoc.hs
@@ -375,29 +375,34 @@
   contents <- mapM (definitionListItemToAsciiDoc opts) items
   modify $ \st -> st{ inList = inlist }
   return $ mconcat contents <> blankline
+
+-- convert admonition and sidebar divs to asicidoc
 blockToAsciiDoc opts (Div (ident,classes,_) bs) = do
   let identifier = if T.null ident then empty else "[[" <> literal ident <> "]]"
-  let admonitions = ["attention","caution","danger","error","hint",
+  let admonition_classes = ["attention","caution","danger","error","hint",
                      "important","note","tip","warning"]
+  let sidebar_class = "sidebar"
+
   contents <-
        case classes of
-         (l:_) | l `elem` admonitions -> do
+         (l:_) | l `elem` admonition_classes || T.toLower l == sidebar_class -> do
              let (titleBs, bodyBs) =
                      case bs of
                        (Div (_,["title"],_) ts : rest) -> (ts, rest)
                        _ -> ([], bs)
-             admonitionTitle <- if null titleBs ||
+             let fence = if l == "sidebar" then "****" else "===="
+             elemTitle <- if null titleBs ||
                                    -- If title matches class, omit
                                    (T.toLower (T.strip (stringify titleBs))) == l
                                    then return mempty
                                    else ("." <>) <$>
                                          blockListToAsciiDoc opts titleBs
-             admonitionBody <- blockListToAsciiDoc opts bodyBs
+             elemBody <- blockListToAsciiDoc opts bodyBs
              return $ "[" <> literal (T.toUpper l) <> "]" $$
-                      chomp admonitionTitle $$
-                      "====" $$
-                      chomp admonitionBody $$
-                      "===="
+                      chomp elemTitle $$
+                      fence $$
+                      chomp elemBody $$
+                      fence
          _ -> blockListToAsciiDoc opts bs
   return $ identifier $$ contents $$ blankline
 
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -558,7 +558,7 @@
         | html5
         , refLocation == EndOfDocument
         -- Note: we need a section for a new slide in slide formats.
-                = H5.section ! A5.id (fromString idName)
+                = H5.section ! prefixedId opts (fromString idName)
                              ! A5.class_ className
                              ! A5.role "doc-endnotes"
                              $ x
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -1077,12 +1077,20 @@
   | Just _ <- T.stripPrefix "data:" src = do
       report $ InlineNotRendered il
       return empty
-inlineToLaTeX (Image attr@(_,_,kvs) _ (source, _)) = do
+inlineToLaTeX (Image attr@(_,_,kvs) description (source, _)) = do
   setEmptyLine False
   let isSVG = ".svg" `T.isSuffixOf` source || ".SVG" `T.isSuffixOf` source
   modify $ \s -> s{ stGraphics = True
                   , stSVG = stSVG s || isSVG }
   opts <- gets stOptions
+  mbalt <- if isSVG
+              then pure Nothing
+              else case lookup "alt" kvs of
+                     Just x -> Just <$> stringToLaTeX TextString x
+                     Nothing
+                       | null description -> pure Nothing
+                       | otherwise -> Just <$> stringToLaTeX TextString
+                                                  (stringify description)
   let showDim dir = let d = text (show dir) <> "="
                     in case dimension dir attr of
                          Just (Pixel a)   ->
@@ -1108,6 +1116,7 @@
                   _ -> ["keepaspectratio"]) <>
                 maybe [] (\x -> ["page=" <> literal x]) (lookup "page" kvs) <>
                 maybe [] (\x -> ["trim=" <> literal x]) (lookup "trim" kvs) <>
+                maybe [] (\x -> ["alt=" <> braces (literal x)]) mbalt <>
                 maybe [] (const ["clip"]) (lookup "clip" kvs)
       options = if null optList
                    then empty
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -721,7 +721,6 @@
   let combinedAttr imgattr = case imgattr of
         ("", cls, kv)
           | (figid, [], []) <- figattr -> Just (figid, cls, kv)
-          | otherwise -> Just ("", cls, kv)
         _ -> Nothing
   let combinedAlt alt = case capt of
         Caption Nothing [] -> if null alt
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -339,7 +339,8 @@
          modify $ \st -> st{ stOptions = oldOpts }
          return result
   opts <- gets stOptions
-  let renderGrid = gridTable opts blocksToDoc specs thead tbody tfoot
+  let specs' = map (\(_,width) -> (AlignDefault, width)) specs
+      renderGrid = gridTable opts blocksToDoc specs' thead tbody tfoot
       isSimple = all (== 0) widths && length widths > 1
       renderSimple = do
         tbl' <- simpleTable opts blocksToDoc headers rows
diff --git a/src/Text/Pandoc/Writers/Shared.hs b/src/Text/Pandoc/Writers/Shared.hs
--- a/src/Text/Pandoc/Writers/Shared.hs
+++ b/src/Text/Pandoc/Writers/Shared.hs
@@ -307,13 +307,12 @@
   let getBodyCells (Ann.BodyRow _ _ rhcells cells) = rhcells ++ cells
   let getBody (Ann.TableBody _ _ hs xs) = map getHeadCells hs <> map getBodyCells xs
   bodyCells <- mapM (renderRows . getBody) tbodies
-  let rows = setTopBorder SingleLine headCells ++
-             (setTopBorder (if null headCells then SingleLine else DoubleLine)
-              . setBottomBorder SingleLine) (mconcat bodyCells) ++
-             (if null footCells
-                 then mempty
-                 else setTopBorder DoubleLine . setBottomBorder DoubleLine $
-                       footCells)
+  let rows = (setTopBorder SingleLine . setBottomBorder DoubleHeaderLine) headCells ++
+             (setTopBorder (if null headCells
+                               then SingleHeaderLine
+                               else SingleLine) . setBottomBorder SingleLine)
+                   (mconcat bodyCells) ++
+             (setTopBorder DoubleLine . setBottomBorder DoubleLine) footCells
   pure $ gridRows $ redoWidths opts colspecs rows
 
 -- Returns (current widths, full widths, min widths)
@@ -367,6 +366,7 @@
 makeDummy c =
     RenderedCell{ cellColNum = cellColNum c,
                   cellColSpan = cellColSpan c,
+                  cellColSpecs = cellColSpecs c,
                   cellAlign = AlignDefault,
                   cellRowSpan = cellRowSpan c - 1,
                   cellWidth = cellWidth c,
@@ -389,23 +389,6 @@
                        cellColNum x < cellColNum c + cellColSpan c) (d:ds))
                    cs
 
-{-
-  reverse $ (case numcols - i' of
-               0 -> id
-               -- TODO this is wrong; it assumes that the row span
-               -- above covers ALL the relevant columns. We need
-               -- to pay attention to the details of the row above
-               -- so we get the borders right.
-               -- TODO the 2 parameter is a placeholder
-               n -> (makeDummy widths i' n 2 :)) cs'
- where
-   (i',cs') = foldl' addDummy (0,[]) cells
-   numcols = length widths
-   addDummy (i,cs) c =
-     case cellColNum c - i of
-       0 -> (cellColNum c + cellColSpan c, c:cs)
-       len -> (cellColNum c + cellColSpan c, c : makeDummy widths i len 2 : cs)
--}
 
 setTopBorder :: LineStyle -> [[RenderedCell Text]] -> [[RenderedCell Text]]
 setTopBorder _ [] = []
@@ -419,9 +402,14 @@
 gridRows :: [[RenderedCell Text]] -> Doc Text
 gridRows [] = mempty
 gridRows (x:xs) =
-  (formatBorder cellTopBorder False (map (\z -> z{ cellBottomBorder = NoLine }) x))
+  (case x of
+     [] -> mempty
+     (c:_) | isHeaderStyle (cellTopBorder c)
+            -> formatHeaderLine (cellTopBorder c) (x:xs)
+           | otherwise
+            -> formatBorder cellTopBorder False x)
   $$
-  vcat (zipWith rowAndBottom (x:xs) (xs ++ [[]]))
+  vcat (zipWith (rowAndBottom (x:xs)) (x:xs) (xs ++ [[]]))
  where
   -- generate wrapped contents. include pipe borders, bottom and left
 
@@ -435,27 +423,51 @@
   formatRow cs = vfill "| " <>
    hcat (intersperse (vfill " | ") (map renderCellContents cs)) <> vfill " |"
 
-  rowAndBottom thisRow nextRow =
+  rowAndBottom allRows thisRow nextRow =
     let isLastRow = null nextRow
-        border1 = render Nothing (formatBorder cellBottomBorder False thisRow)
-        border2 = render Nothing (formatBorder cellTopBorder False nextRow)
-        go '+' _ = '+'
-        go _ '+' = '+'
-        go '|' '-' = '+'
-        go '-' '|' = '+'
-        go '|' '=' = '+'
-        go '=' '|' = '+'
-        go '=' _ = '='
-        go _ '=' = '='
-        go ' ' d = d
-        go c _   = c
+        border1 = case thisRow of
+                     [] -> mempty
+                     (c:_) -> if isHeaderStyle (cellBottomBorder c)
+                                 then formatHeaderLine (cellBottomBorder c) allRows
+                                 else formatBorder cellBottomBorder False thisRow
+        border2 = case nextRow of
+                     [] -> mempty
+                     (c:_) -> if isHeaderStyle (cellTopBorder c)
+                                 then formatHeaderLine (cellTopBorder c) allRows
+                                 else formatBorder cellTopBorder False nextRow
         combinedBorder = if isLastRow
-                            then literal border1
-                            else literal $ T.zipWith go border1 border2
+                            then border1
+                            else literal $ combineBorders
+                                  (render Nothing border1) (render Nothing border2)
     in formatRow thisRow $$ combinedBorder
 
-formatBorder :: (RenderedCell a -> LineStyle) -> Bool -> [RenderedCell a]
-             -> Doc Text
+combineBorders :: Text -> Text -> Text
+combineBorders t1 t2 =
+  if T.null t1
+     then t2
+     else T.zipWith go t1 t2
+ where
+   go '+' _ = '+'
+   go _ '+' = '+'
+   go ':' _ = ':'
+   go _ ':' = ':'
+   go '|' '-' = '+'
+   go '-' '|' = '+'
+   go '|' '=' = '+'
+   go '=' '|' = '+'
+   go '=' _ = '='
+   go _ '=' = '='
+   go ' ' d = d
+   go c _   = c
+
+formatHeaderLine :: Show a => LineStyle -> [[RenderedCell a]] -> Doc Text
+formatHeaderLine lineStyle rows =
+  literal $ foldl'
+    (\t row -> combineBorders t (render Nothing $ formatBorder (const lineStyle) True row))
+    mempty rows
+
+formatBorder :: Show a => (RenderedCell a -> LineStyle) -> Bool
+             -> [RenderedCell a] -> Doc Text
 formatBorder borderStyle alignMarkers cs =
   borderParts <> if lastBorderStyle == NoLine
                             then char '|'
@@ -473,7 +485,9 @@
        lineChar = case borderStyle c of
                      NoLine -> ' '
                      SingleLine -> '-'
+                     SingleHeaderLine -> '-'
                      DoubleLine -> '='
+                     DoubleHeaderLine -> '='
        (leftalign, rightalign) =
            case cellAlign c of
              _ | not alignMarkers -> (lineChar,lineChar)
@@ -482,12 +496,22 @@
              AlignRight -> (lineChar,':')
              AlignDefault -> (lineChar,lineChar)
 
-data LineStyle = NoLine | SingleLine | DoubleLine
+data LineStyle = NoLine
+               | SingleLine
+               | DoubleLine
+               | SingleHeaderLine
+               | DoubleHeaderLine
     deriving (Show, Ord, Eq)
 
+isHeaderStyle :: LineStyle -> Bool
+isHeaderStyle SingleHeaderLine = True
+isHeaderStyle DoubleHeaderLine = True
+isHeaderStyle _ = False
+
 data RenderedCell a =
   RenderedCell{ cellColNum :: Int
               , cellColSpan :: Int
+              , cellColSpecs :: NonEmpty ColSpec
               , cellAlign :: Alignment
               , cellRowSpan :: Int
               , cellWidth :: Int
@@ -520,6 +544,7 @@
     rendered <- renderer blocks
     pure $ RenderedCell{ cellColNum = colnum,
                          cellColSpan = length cellcolspecs,
+                         cellColSpecs = cellcolspecs,
                          cellAlign = align,
                          cellRowSpan = rowspan,
                          cellWidth = width,
diff --git a/test/Tests/Writers/AsciiDoc.hs b/test/Tests/Writers/AsciiDoc.hs
--- a/test/Tests/Writers/AsciiDoc.hs
+++ b/test/Tests/Writers/AsciiDoc.hs
@@ -62,6 +62,19 @@
                                            , "foo"
                                            , "----"
                                            ]
+          , testAsciidoc "sidebar block" $
+               divWith ("sidebar_id", ["sidebar"], [])
+                                           (divWith ("", ["title"], [])
+                                           (plain "Sidebar Title")
+                                           <> para "Sidebar paragraph"
+                                           ) =?> unlines
+                                           [ "[[sidebar_id]]"
+                                           , "[SIDEBAR]"
+                                           , ".Sidebar Title"
+                                           , "****"
+                                           , "Sidebar paragraph"
+                                           , "****"
+                                           ]
           ]
         , testGroup "tables"
           [ testAsciidoc "empty cells" $
diff --git a/test/Tests/Writers/LaTeX.hs b/test/Tests/Writers/LaTeX.hs
--- a/test/Tests/Writers/LaTeX.hs
+++ b/test/Tests/Writers/LaTeX.hs
@@ -70,7 +70,7 @@
             "\\begin{description}\n\\item[foo] ~ \n\\subsection{bar}\n\nbaz\n\\end{description}"
           , "containing image" =:
             header 1 (image "imgs/foo.jpg" "" (text "Alt text")) =?>
-            "\\section{\\texorpdfstring{\\protect\\pandocbounded{\\includegraphics[keepaspectratio]{imgs/foo.jpg}}}{Alt text}}"
+            "\\section{\\texorpdfstring{\\protect\\pandocbounded{\\includegraphics[keepaspectratio,alt={Alt text}]{imgs/foo.jpg}}}{Alt text}}"
           ]
         , testGroup "inline code"
           [ "struck out and highlighted" =:
diff --git a/test/command/10848.md b/test/command/10848.md
--- a/test/command/10848.md
+++ b/test/command/10848.md
@@ -17,7 +17,7 @@
 </tr>
 </table>
 ^D
-+-----------+-------+
++---+---+---+---+---+
 | A         | F     |
 +---+-------+-------+
 | C | B     | H     |
@@ -47,7 +47,7 @@
 </tr>
 </table>
 ^D
-+-------+-------+---+
++---+---+-------+---+
 | A     | J     | F |
 +---+---+-------+   |
 | C | B | H     |   |
diff --git a/test/command/10855.md b/test/command/10855.md
new file mode 100644
--- /dev/null
+++ b/test/command/10855.md
@@ -0,0 +1,71 @@
+```
+% pandoc -t markdown
++----------+----+
+| h1       | h2 |
++:===:+===:+:===+
+| A        | B  |
++-----+----+----+
+| C   | D  | E  |
++-----+----+----+
+^D
++-------------+----+
+| h1          | h2 |
++:====:+=====:+:===+
+| A           | B  |
++------+------+----+
+| C    | D    | E  |
++------+------+----+
+
+```
+
+```
+% pandoc -t markdown
++-----+----+----+
+| h1  | h2 | h3 |
++:===:+===:+:===+
+| A        | B  |
++-----+----+----+
+| C   | D  | E  |
++-----+----+----+
+^D
++------+------+----+
+| h1   | h2   | h3 |
++:====:+=====:+:===+
+| A           | B  |
++------+------+----+
+| C    | D    | E  |
++------+------+----+
+
+```
+
+```
+% pandoc -t markdown
++:------:+:-----------:+
+| hello  | ![a](b.png) |
++--------+-------------+
+| hello  | ![c](b.png) |
++--------+-------------+
+^D
++:------:+:-----------:+
+| hello  | ![a](b.png) |
++--------+-------------+
+| hello  | ![c](b.png) |
++--------+-------------+
+
+```
+
+```
+% pandoc -t markdown
++:------:+:-----------:+
+| hello  | ![a](b.png) |
++--------+-------------+
+| hello  | ![c](b.png) |
++--------+-------------+
+^D
++:------:+:-----------:+
+| hello  | ![a](b.png) |
++--------+-------------+
+| hello  | ![c](b.png) |
++--------+-------------+
+
+```
diff --git a/test/command/10862.md b/test/command/10862.md
new file mode 100644
--- /dev/null
+++ b/test/command/10862.md
@@ -0,0 +1,6 @@
+```
+% pandoc --embed-resources
+<script></script>
+^D
+<script></script>
+```
diff --git a/test/command/10867.md b/test/command/10867.md
new file mode 100644
--- /dev/null
+++ b/test/command/10867.md
@@ -0,0 +1,26 @@
+```
+% pandoc -f native -t markdown-raw_html
+[ Figure
+    ( "fig:foo" , [] , [ ( "label" , "1.1" ) ] )
+    (Caption
+       Nothing
+       [ Plain
+           [ Str "Figure" , Space , Str "1.1:" , Space , Str "Figure" ]
+       ])
+    [ Plain
+        [ Image
+            ( "" , [] , [] )
+            [ Str "Figure" , Space , Str "1.1:" , Space , Str "Figure" ]
+            ( "./image.png" , "" )
+        ]
+    ]
+]
+^D
+:::: {#fig:foo .figure label="1.1"}
+![Figure 1.1: Figure](./image.png)
+
+::: caption
+Figure 1.1: Figure
+:::
+::::
+```
diff --git a/test/command/3450.md b/test/command/3450.md
--- a/test/command/3450.md
+++ b/test/command/3450.md
@@ -8,5 +8,5 @@
 % pandoc -fmarkdown-implicit_figures -t latex
 ![image](lalune.jpg){height=2em}
 ^D
-\includegraphics[width=\linewidth,height=2em,keepaspectratio]{lalune.jpg}
+\includegraphics[width=\linewidth,height=2em,keepaspectratio,alt={image}]{lalune.jpg}
 ```
diff --git a/test/command/4235.md b/test/command/4235.md
--- a/test/command/4235.md
+++ b/test/command/4235.md
@@ -4,7 +4,7 @@
 ^D
 <p>This.<a href="#foofn1" class="footnote-ref" id="foofnref1"
 role="doc-noteref"><sup>1</sup></a></p>
-<section id="footnotes" class="footnotes footnotes-end-of-document"
+<section id="foofootnotes" class="footnotes footnotes-end-of-document"
 role="doc-endnotes">
 <hr />
 <ol>
diff --git a/test/command/5116.md b/test/command/5116.md
--- a/test/command/5116.md
+++ b/test/command/5116.md
@@ -12,7 +12,7 @@
 ^D
 \begin{figure}
 \centering
-\pandocbounded{\includegraphics[keepaspectratio]{img.jpg}}
+\pandocbounded{\includegraphics[keepaspectratio,alt={This is a figure.}]{img.jpg}}
 \caption{This is a figure.}
 \end{figure}
 
@@ -50,7 +50,7 @@
 \begin{figure}
 \centering
 \caption{This is a figure.}
-\pandocbounded{\includegraphics[keepaspectratio]{img.jpg}}
+\pandocbounded{\includegraphics[keepaspectratio,alt={This is a figure.}]{img.jpg}}
 \end{figure}
 
 \begin{longtable}[]{@{}rlcl@{}}
@@ -86,7 +86,7 @@
 ^D
 \begin{figure}
 \centering
-\pandocbounded{\includegraphics[keepaspectratio]{img.jpg}}
+\pandocbounded{\includegraphics[keepaspectratio,alt={This is a figure.}]{img.jpg}}
 \caption{This is a figure.}
 \end{figure}
 
diff --git a/test/command/5476.md b/test/command/5476.md
--- a/test/command/5476.md
+++ b/test/command/5476.md
@@ -4,7 +4,7 @@
 ^D
 \begin{figure}
 \centering
-\pandocbounded{\includegraphics[keepaspectratio]{test/lalune.jpg}}
+\pandocbounded{\includegraphics[keepaspectratio,alt={moon}]{test/lalune.jpg}}
 \caption[moon]{moon\footnotemark{}}
 \end{figure}
 \footnotetext{the moon}
diff --git a/test/command/7181.md b/test/command/7181.md
--- a/test/command/7181.md
+++ b/test/command/7181.md
@@ -4,7 +4,7 @@
 ^D
 \begin{figure}
 \centering
-\pandocbounded{\includegraphics[keepaspectratio,page=13,trim=1cm,clip,width=4cm]{slides.pdf}}
+\pandocbounded{\includegraphics[keepaspectratio,page=13,trim=1cm,clip,width=4cm,alt={Global frog population.}]{slides.pdf}}
 \caption{Global frog population.}
 \end{figure}
 
diff --git a/test/command/9045.md b/test/command/9045.md
--- a/test/command/9045.md
+++ b/test/command/9045.md
@@ -4,7 +4,7 @@
 ^D
 \begin{figure}
 \centering
-\pandocbounded{\includegraphics[keepaspectratio]{there.jpg}}
+\pandocbounded{\includegraphics[keepaspectratio,alt={hi}]{there.jpg}}
 \caption{hi}\label{foo}
 \end{figure}
 ```
diff --git a/test/tables.haddock b/test/tables.haddock
--- a/test/tables.haddock
+++ b/test/tables.haddock
@@ -2,7 +2,7 @@
 
 +-------+------+--------+---------+
 | Right | Left | Center | Default |
-+=======+======+========+=========+
++======:+:=====+:======:+=========+
 | 12    | 12   | 12     | 12      |
 +-------+------+--------+---------+
 | 123   | 123  | 123    | 123     |
@@ -16,7 +16,7 @@
 
 +-------+------+--------+---------+
 | Right | Left | Center | Default |
-+=======+======+========+=========+
++======:+:=====+:======:+=========+
 | 12    | 12   | 12     | 12      |
 +-------+------+--------+---------+
 | 123   | 123  | 123    | 123     |
@@ -28,7 +28,7 @@
 
 +-------+------+--------+---------+
 | Right | Left | Center | Default |
-+=======+======+========+=========+
++======:+:=====+:======:+=========+
 | 12    | 12   | 12     | 12      |
 +-------+------+--------+---------+
 | 123   | 123  | 123    | 123     |
@@ -43,7 +43,7 @@
 +-----------+----------+------------+---------------------------+
 | Centered  | Left     | Right      | Default aligned           |
 | Header    | Aligned  | Aligned    |                           |
-+===========+==========+============+===========================+
++:=========:+:=========+===========:+:==========================+
 | First     | row      | 12.0       | Example of a row that     |
 |           |          |            | spans multiple lines.     |
 +-----------+----------+------------+---------------------------+
@@ -59,7 +59,7 @@
 +-----------+----------+------------+---------------------------+
 | Centered  | Left     | Right      | Default aligned           |
 | Header    | Aligned  | Aligned    |                           |
-+===========+==========+============+===========================+
++:=========:+:=========+===========:+:==========================+
 | First     | row      | 12.0       | Example of a row that     |
 |           |          |            | spans multiple lines.     |
 +-----------+----------+------------+---------------------------+
@@ -70,7 +70,7 @@
 
 Table without column headers:
 
-+-----+-----+-----+-----+
++----:+:----+:---:+----:+
 | 12  | 12  | 12  | 12  |
 +-----+-----+-----+-----+
 | 123 | 123 | 123 | 123 |
@@ -80,7 +80,7 @@
 
 Multiline table without column headers:
 
-+-----------+----------+------------+---------------------------+
++:---------:+:---------+-----------:+---------------------------+
 | First     | row      | 12.0       | Example of a row that     |
 |           |          |            | spans multiple lines.     |
 +-----------+----------+------------+---------------------------+
diff --git a/test/tables.muse b/test/tables.muse
--- a/test/tables.muse
+++ b/test/tables.muse
@@ -23,7 +23,7 @@
 
 Multiline table with caption:
 
-+-----------+----------+------------+---------------------------+
++:---------:+:---------+-----------:+:--------------------------+
 | Centered  | Left     | Right      | Default aligned           |
 | Header    | Aligned  | Aligned    |                           |
 +-----------+----------+------------+---------------------------+
@@ -36,7 +36,7 @@
 +-----------+----------+------------+---------------------------+
 Multiline table without caption:
 
-+-----------+----------+------------+---------------------------+
++:---------:+:---------+-----------:+:--------------------------+
 | Centered  | Left     | Right      | Default aligned           |
 | Header    | Aligned  | Aligned    |                           |
 +-----------+----------+------------+---------------------------+
@@ -55,7 +55,7 @@
 
 Multiline table without column headers:
 
-+-----------+----------+------------+---------------------------+
++:---------:+:---------+-----------:+---------------------------+
 | First     | row      | 12.0       | Example of a row that     |
 |           |          |            | spans multiple lines.     |
 +-----------+----------+------------+---------------------------+
diff --git a/test/tables/planets.markdown b/test/tables/planets.markdown
--- a/test/tables/planets.markdown
+++ b/test/tables/planets.markdown
@@ -2,7 +2,7 @@
 |                  | Name    | Mass       | Diameter | Density   | Gravity  | Length  | Distance  | Mean        | Number | Notes        |
 |                  |         | (10\^24kg) | (km)     | (kg/m\^3) | (m/s\^2) | of day  | from Sun  | temperature | of     |              |
 |                  |         |            |          |           |          | (hours) | (10\^6km) | (C)         | moons  |              |
-+==================+=========+============+==========+===========+==========+=========+===========+=============+========+==============+
++:=======:+:======:+=========+===========:+=========:+==========:+=========:+========:+==========:+============:+=======:+==============+
 | Terrestrial      | Mercury | 0.330      | 4,879    | 5427      | 3.7      | 4222.6  | 57.9      | 167         | 0      | Closest to   |
 | planets          |         |            |          |           |          |         |           |             |        | the Sun      |
 |                  +---------+------------+----------+-----------+----------+---------+-----------+-------------+--------+--------------+
diff --git a/test/tables/students.markdown b/test/tables/students.markdown
--- a/test/tables/students.markdown
+++ b/test/tables/students.markdown
@@ -1,6 +1,6 @@
 +-----------------------------------------+-----------------------------------------+
 | Student ID                              | Name                                    |
-+=========================================+=========================================+
++:========================================+:========================================+
 | Computer Science                                                                  |
 +-----------------------------------------+-----------------------------------------+
 | 3741255                                 | Jones, Martha                           |
diff --git a/test/writer.latex b/test/writer.latex
--- a/test/writer.latex
+++ b/test/writer.latex
@@ -923,12 +923,12 @@
 
 \begin{figure}
 \centering
-\pandocbounded{\includegraphics[keepaspectratio]{lalune.jpg}}
+\pandocbounded{\includegraphics[keepaspectratio,alt={lalune}]{lalune.jpg}}
 \caption{lalune}
 \end{figure}
 
-Here is a movie \pandocbounded{\includegraphics[keepaspectratio]{movie.jpg}}
-icon.
+Here is a movie
+\pandocbounded{\includegraphics[keepaspectratio,alt={movie}]{movie.jpg}} icon.
 
 \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
 
