diff --git a/docs/index.md b/docs/index.md
--- a/docs/index.md
+++ b/docs/index.md
@@ -789,7 +789,7 @@
 -   `linkReferences`, default `false`: Make references hyperlinks to the
     referenced element
 -   `nameInLink`, default `false`: For single-element references,
-    inlcude prefix into hyperlink (when using `linkReferences`)
+    include prefix into hyperlink (when using `linkReferences`)
 
 Note that none of the `*Delim` options are honored with cleveref output.
 Use cleveref's customization options instead.
diff --git a/lib-internal/Text/Pandoc/CrossRef/References/Blocks/Subfigures.hs b/lib-internal/Text/Pandoc/CrossRef/References/Blocks/Subfigures.hs
--- a/lib-internal/Text/Pandoc/CrossRef/References/Blocks/Subfigures.hs
+++ b/lib-internal/Text/Pandoc/CrossRef/References/Blocks/Subfigures.hs
@@ -94,7 +94,7 @@
       | otherwise = blks
       where
         figurize x
-          | Para is <- x = case (mapMaybe getImg is) `zip` widths' of
+          | Para is <- x = case mapMaybe getImg is `zip` widths' of
               [] -> Nothing -- skip empty Paras
               [_] -> error "The impossible happened: single-element Para in \
                 \subfigure which is not a figure"
diff --git a/lib-internal/Text/Pandoc/CrossRef/References/Blocks/Util.hs b/lib-internal/Text/Pandoc/CrossRef/References/Blocks/Util.hs
--- a/lib-internal/Text/Pandoc/CrossRef/References/Blocks/Util.hs
+++ b/lib-internal/Text/Pandoc/CrossRef/References/Blocks/Util.hs
@@ -39,7 +39,6 @@
 import Text.Pandoc.Shared (stringify, deNote)
 import Text.Pandoc.Walk (walk)
 import Control.Monad (when)
-import Data.Maybe (fromMaybe)
 
 import Text.Read (readMaybe)
 
@@ -103,7 +102,7 @@
         | otherwise = 1
       index = chap S.|> (i, refLabel <|> customLabel (Pfx pfx) i)
       synthLabel = IdxSynth globCtr
-      label' = fromMaybe synthLabel $ IdxRef pfx <$> label
+      label' = maybe synthLabel (IdxRef pfx) label
   when (M.member label' prop') $
     error $ "Duplicate label: " <> displayIdx label'
   wsReferences . ctrsAt pfx .= index
diff --git a/pandoc-crossref.cabal b/pandoc-crossref.cabal
--- a/pandoc-crossref.cabal
+++ b/pandoc-crossref.cabal
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           pandoc-crossref
-version:        0.3.24
+version:        0.3.25
 synopsis:       Pandoc filter for cross-references
 description:    pandoc-crossref is a pandoc filter for numbering figures, equations, tables and cross-references to them.
 category:       Text
@@ -108,6 +108,9 @@
     test/m2m/numberOverride/expect.md
     test/m2m/numberOverride/expect.tex
     test/m2m/numberOverride/input.md
+    test/m2m/preserveAltText/expect.md
+    test/m2m/preserveAltText/expect.tex
+    test/m2m/preserveAltText/input.md
     test/m2m/refsInListOf/expect.md
     test/m2m/refsInListOf/expect.tex
     test/m2m/refsInListOf/input.md
@@ -178,7 +181,7 @@
     , microlens >=0.4.12.0 && <0.5.0.0
     , microlens-mtl >=0.2.0.1 && <0.3.0.0
     , mtl >=1.1 && <2.4
-    , pandoc >=3.8.2 && <3.10
+    , pandoc ==3.10.*
     , pandoc-crossref-internal
     , pandoc-types ==1.23.*
     , text >=1.2.2 && <2.2
@@ -232,7 +235,7 @@
     , microlens-mtl >=0.2.0.1 && <0.3.0.0
     , microlens-th >=0.4.3.10 && <0.5.0.0
     , mtl >=1.1 && <2.4
-    , pandoc >=3.8.2 && <3.10
+    , pandoc ==3.10.*
     , pandoc-types ==1.23.*
     , syb >=0.4 && <0.8
     , template-haskell >=2.7.0.0 && <3.0.0.0
@@ -262,7 +265,7 @@
     , gitrev >=1.3.1 && <1.4
     , open-browser >=0.2 && <0.4
     , optparse-applicative >=0.13 && <0.20
-    , pandoc >=3.8.2 && <3.10
+    , pandoc ==3.10.*
     , pandoc-crossref
     , pandoc-types ==1.23.*
     , template-haskell >=2.7.0.0 && <3.0.0.0
@@ -292,7 +295,7 @@
     , directory >=1 && <1.4
     , filepath >=1.1 && <1.6
     , hspec >=2.4.4 && <3
-    , pandoc >=3.8.2 && <3.10
+    , pandoc ==3.10.*
     , pandoc-crossref
     , pandoc-types ==1.23.*
     , text >=1.2.2 && <2.2
@@ -328,7 +331,7 @@
     , microlens >=0.4.12.0 && <0.5.0.0
     , microlens-mtl >=0.2.0.1 && <0.3.0.0
     , mtl >=1.1 && <2.4
-    , pandoc >=3.8.2 && <3.10
+    , pandoc ==3.10.*
     , pandoc-crossref
     , pandoc-crossref-internal
     , pandoc-types ==1.23.*
@@ -357,7 +360,7 @@
   build-depends:
       base >=4.19 && <5
     , criterion >=1.5.9.0 && <1.7
-    , pandoc >=3.8.2 && <3.10
+    , pandoc ==3.10.*
     , pandoc-crossref
     , pandoc-types ==1.23.*
     , text >=1.2.2 && <2.2
diff --git a/test/m2m/preserveAltText/expect.md b/test/m2m/preserveAltText/expect.md
new file mode 100644
--- /dev/null
+++ b/test/m2m/preserveAltText/expect.md
@@ -0,0 +1,12 @@
+![Figure 1: Single figure](./fig1.png){#fig:one alt="Single figure"}
+
+:::: {#fig:figureRef .figure .subfigures}
+![a](image1.png){#fig:figureRefA alt="subfigure 1 caption"}
+
+![b](image2.png){#fig:figureRefB alt="subfigure 2 caption"}
+
+::: caption
+Figure 2: Caption of figure. a --- subfigure 1 caption, b --- subfigure
+2 caption
+:::
+::::
diff --git a/test/m2m/preserveAltText/expect.tex b/test/m2m/preserveAltText/expect.tex
new file mode 100644
--- /dev/null
+++ b/test/m2m/preserveAltText/expect.tex
@@ -0,0 +1,17 @@
+\begin{figure}
+\centering
+\pandocbounded{\includegraphics[keepaspectratio,alt={Single figure}]{./fig1.png}}
+\caption{Single figure}\label{fig:one}
+\end{figure}
+
+\begin{pandoccrossrefsubfigures}
+
+\begin{subfigure}{1.0\linewidth}\centering\pandocbounded{\includegraphics[keepaspectratio,alt={subfigure 1 caption}]{image1.png}}\caption{subfigure
+1 caption\label{fig:figureRefA}}\end{subfigure}%
+
+\begin{subfigure}{1.0\linewidth}\centering\pandocbounded{\includegraphics[keepaspectratio,alt={subfigure 2 caption}]{image2.png}}\caption{subfigure
+2 caption\label{fig:figureRefB}}\end{subfigure}%
+
+\caption{Caption of figure}\label{fig:figureRef}
+
+\end{pandoccrossrefsubfigures}
diff --git a/test/m2m/preserveAltText/input.md b/test/m2m/preserveAltText/input.md
new file mode 100644
--- /dev/null
+++ b/test/m2m/preserveAltText/input.md
@@ -0,0 +1,13 @@
+---
+preserveAltText: True
+---
+
+![Single figure](./fig1.png){#fig:one}
+
+:::{#fig:figureRef}
+![subfigure 1 caption](image1.png){#fig:figureRefA}
+
+![subfigure 2 caption](image2.png){#fig:figureRefB}
+
+Caption of figure
+:::
diff --git a/test/m2m/standalone-listOfMetadata/expect.md b/test/m2m/standalone-listOfMetadata/expect.md
--- a/test/m2m/standalone-listOfMetadata/expect.md
+++ b/test/m2m/standalone-listOfMetadata/expect.md
@@ -104,14 +104,14 @@
 rangeDelim: "-"
 refDelim: ", "
 refIndexTemplate: $$i$$$$suf$$
-secHeaderDelim:
+secHeaderDelim: 
 secHeaderTemplate: $$i$$$$secHeaderDelim[n]$$$$t$$
 secLabels: arabic
 secPrefix:
 - sec.
 - secs.
 secPrefixTemplate: $$p$$ $$i$$
-sectionsDepth: 0
+sectionsDepth: "0"
 standalone: true
 subfigGrid: false
 subfigLabels: alpha a
diff --git a/test/test-pandoc-crossref.hs b/test/test-pandoc-crossref.hs
--- a/test/test-pandoc-crossref.hs
+++ b/test/test-pandoc-crossref.hs
@@ -420,7 +420,7 @@
 testCBCaptions :: Blocks -> Blocks -> Expectation
 testCBCaptions bs res =
   let opts = defaultOptions{Text.Pandoc.CrossRef.Util.Options.codeBlockCaptions=True}
-  in (bottomUp (\bs' -> fromMaybe bs' $ Util.CodeBlockCaptions.mkCodeBlockCaptions opts bs') (toList bs)) `shouldBe` toList res
+  in bottomUp (\bs' -> fromMaybe bs' $ Util.CodeBlockCaptions.mkCodeBlockCaptions opts bs') (toList bs) `shouldBe` toList res
 
 testList :: Blocks -> References -> Blocks -> Expectation
 testList bs st res = runWSWithOptsInit defaultOptions st (bottomUpM listOf' (toList bs))
@@ -505,10 +505,7 @@
 infixr 0 =:
 (=:) :: Prefix -> M.Map RefIndex RefRec -> References
 a =: b = def
-  & ctrsAt a .~ (refIndex $ last $ M.elems b)
+  & ctrsAt a .~ refIndex (last $ M.elems b)
   & refsAt a .~ b
   & stGlob %~ (+ fromIntegral (M.size b))
-  & stHiddenHeaderLevel .~
-    if a == PfxSec
-    then [HiddenHeader { hhLevel = 1, hhHidden = False }]
-    else []
+  & stHiddenHeaderLevel .~ [HiddenHeader { hhLevel = 1, hhHidden = False } | a == PfxSec]
