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;