From 09b2cd6de51610a44bdf9f000b74a83273d279c2 Mon Sep 17 00:00:00 2001 From: Tobias Schmitz Date: Wed, 25 Jun 2025 17:47:05 +0200 Subject: [PATCH] docs: fixup some comments --- crates/typst-library/src/pdf/accessibility.rs | 3 ++- crates/typst-pdf/src/tags.rs | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/typst-library/src/pdf/accessibility.rs b/crates/typst-library/src/pdf/accessibility.rs index 086a172bf..a5df131d6 100644 --- a/crates/typst-library/src/pdf/accessibility.rs +++ b/crates/typst-library/src/pdf/accessibility.rs @@ -192,10 +192,11 @@ pub enum TableHeaderScope { /// TODO: maybe generalize this and use it to mark html elements with `aria-hidden="true"`? #[elem(Locatable, Show)] pub struct ArtifactElem { + /// The artifact kind. #[default(ArtifactKind::Other)] pub kind: ArtifactKind, - /// The content to underline. + /// The content that is an artifact. #[required] pub body: Content, } diff --git a/crates/typst-pdf/src/tags.rs b/crates/typst-pdf/src/tags.rs index 4795edef8..b03279a5b 100644 --- a/crates/typst-pdf/src/tags.rs +++ b/crates/typst-pdf/src/tags.rs @@ -325,9 +325,8 @@ pub(crate) fn handle_start(gc: &mut GlobalContext, elem: &Content) { .and_then(StackEntryKind::as_standard_mut) .filter(|tag| tag.kind == TagKind::Figure); if let Some(figure_tag) = figure_tag { + // Set alt text of outer figure tag, if not present. if figure_tag.alt_text.is_none() { - // HACK: set alt text of outer figure tag, if the contained image - // has alt text specified figure_tag.alt_text = alt; } return;