PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
M12: mark leaf tags as artifacts (#1475)
Earl Co0b732e90ff63
diff --git a/ATTRIBUTION.toml b/ATTRIBUTION.tomlindex 07433fc45..6715f7b4c 100644--- a/ATTRIBUTION.toml+++ b/ATTRIBUTION.toml@@ -7,7 +7,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Greek UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "389982dcbb7f1ac29fb150c9af43f9529db6e59a091b9971f0401684847d8b53"+sha256 = "1fd7a303d0c256893a3201eee403386f1501a5706af5903e843e9f5a8449d619"# ATTRIBUTION.toml: one entry per asset (AGENTS.md §1). The source of truth for provenance and licences.# ATTRIBUTION.md is generated from this file: `cargo xtask assets --write`. Checked by `cargo xtask assets` (part of `xtask ci`).@@ -30,7 +30,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Simplified Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "d8ea23644d81476e3fd35c09780ab9b3ac8c9e28bed4e14e1cbc6493bb896d91"+sha256 = "e3e896ca45a954406a235b66085de6a3e6c8209a1d2a1164ac8ae88a1562cdfb"[[asset]]path = "crates/ui-egui/src/i18n/zh-hant.tsv"@@ -41,7 +41,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Traditional Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "26dd0b0d697fd40db996fc102f3c7f2320bdeb6d6af38dbdde353bd5d940baad"+sha256 = "d7de75508c3637033c93886b742245f903a6f806bab208ff295bf57e7707e7bb"[[asset]]path = "crates/ui-egui/src/i18n/cs.tsv"@@ -52,7 +52,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Czech UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "322b8cda21a2b8d157716182846619bd92bfb31263d1f8d13da7eaad365fbfd7"+sha256 = "ffb55f4e78a7dacb6d76bc36f1f5e593b889d5f6680f1c53c8818b1b9cdce501"[[asset]]path = "crates/ui-egui/src/i18n/pt-br.tsv"@@ -63,7 +63,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Brazilian Portuguese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "21bf9c73b482eb987ddaf839b4a4aa8f9938d5aa10428e6d39beea254a95a0c0"+sha256 = "471209d1828dafb11c117260ff53616d580cec02fecd37f6685ba7f200b2549e"[[asset]]path = "crates/ui-egui/src/i18n/es.tsv"@@ -74,7 +74,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Spanish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "fef35ae1771edf2e044e72aebb958bb4827ded57234207f96b6cb7a250fedb22"+sha256 = "fbdf46be923e9cc88cb62019108239d2a47fdd3cc54e87f30a70ad9497364180"[[asset]]path = "crates/ui-egui/src/i18n/fr.tsv"@@ -85,7 +85,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "French UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "d723622298b10400e9a1ba697cbebd831f5e0f7e5bbe4545b97f61e64db7535f"+sha256 = "e0f031f7ec4c30e9750575792ae18920a0a42ad215f1c394632b52ca308ca65f"[[asset]]path = "crates/ui-egui/src/i18n/de.tsv"@@ -96,7 +96,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "German UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "686ab9658b7ef9dd7f3af05ce73f99f1ab2a75f8357bad6f7e987d40a8730df9"+sha256 = "4a3bbef4db399b02ec62804e4614a2dec42942f90da613854590cbc4b06ea082"[[asset]]path = "crates/ui-egui/src/i18n/te.tsv"@@ -107,7 +107,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Telugu UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "90b94038699aa74aa48ffbda3e90a2255b65d0dbf081e8ecf20c5804940fc129"+sha256 = "41ab9886af95cc845ff8d7d89f2794e3663f5682c21e9f553480edb5499f5abf"[[asset]]path = "crates/ui-egui/src/i18n/it.tsv"@@ -118,7 +118,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Italian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "5aa6475df91a3e82010aee198c2e29bb80328505bbd0240f3828e36a5d6dfdf3"+sha256 = "1ecc78878e5c5151f1afc4be2cb15ba05095d35119a2bfadac02b0b921c52df4"[[asset]]path = "crates/ui-egui/src/i18n/pl.tsv"@@ -129,7 +129,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Polish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "e6d306d9bf289fac2fe8fcfa6f9d0a51b650728e45669289d391be2031076692"+sha256 = "1e30d02a94f554abf24f23e84242bcc04688de5e3631873147504f900568d13a"[[asset]]path = "crates/ui-egui/src/i18n/ru.tsv"@@ -140,7 +140,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Russian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "277f4995a87297a2fcc473df1feebdbdf3378fa460a7f85eb1a0a151cee40a2b"+sha256 = "ae04d6fab0f225d01de7907d70dc58a9135d65f127f845c553344bcfd08fcd6d"[[asset]]path = "crates/ui-egui/src/i18n/hu.tsv"@@ -151,7 +151,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Hungarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "01b32370cedce935b74925858a79ee691dc2a5560ba5eb758de2de1c243c528e"+sha256 = "7ff4cd557d7d3ee1ada2d667653db578bae8964f021366cb11d9d03f81d8cb32"[[asset]]path = "crates/ui-egui/src/i18n/bg.tsv"@@ -162,7 +162,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Bulgarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "f8ae97901c61dfdc0a844a23356173211bb052b3ff54128d7edc8097c535eee9"+sha256 = "fefc14be320cc7625b1c0a02cc26f27722b5d73052ef2d6056f3bb07363e5888"[[asset]]path = "crates/ui-egui/src/i18n/kk.tsv"@@ -173,7 +173,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Kazakh UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "7107ba77577794395451dd85355a86ef3e033a7f240b72414b877b9b43adb19e"+sha256 = "6590241c4156d0da89011948e5fd65b363916d7724390d854d19cd21d3e9f440"[[asset]]path = "crates/ui-egui/src/i18n/ja.tsv"@@ -184,7 +184,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Japanese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "114b3d50531eb1682535c7a646e62914b0c9afaa5d5d1b9f66b94fd472e4e7b3"+sha256 = "12f0cfe67ad61741ebb96668137eb62a520ef3c4bb7961d451911c73d58ae0b8"[[asset]]path = "crates/ui-egui/src/i18n/uk.tsv"@@ -195,7 +195,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Ukrainian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "f56ec5f4cb7d1992041df0783f1cfd76c27d5d180c3f73c60b104e3fd02f600d"+sha256 = "5db1450bf0e71db21c9bcb994b4e7a529106ae52ffae2d6118997295e0ac8517"[[asset]]path = "crates/ui-egui/src/i18n/ar.tsv"@@ -206,7 +206,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Arabic UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "113fdf57e28fcff90d212fb468011bedebfb98ac100218d29b584f4de4c87912"+sha256 = "b34a98f97fb5ceb8f602ab005e859b070d72d73fd3def5a73a3f9eb6915a4d28"[[asset]]path = "crates/ui-egui/src/i18n/tr.tsv"@@ -217,7 +217,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Turkish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "2b5edfe026578ed475f07f94f1d1ed4a3dac93a745c19209589936e2d67f6ec5"+sha256 = "17b984f557eb36908baf06880a3b540eadc39910283b37e0ae905175db320f45"[[asset]]path = "crates/ui-egui/src/i18n/lt.tsv"@@ -228,7 +228,7 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Lithuanian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "fe58835b0538f470b463f078e1b4cdf78a8e2632056bc61c6946071478f39a64"+sha256 = "2daa34aacddccdbe9862932c5c6f0a0d8bdb86b07cc385a82f0ceaf9f1c4f333"[[asset]]path = "assets/icons/accessibility.svg"@@ -3351,4 +3351,4 @@ licence = "MIT OR Apache-2.0"licence_file = "LICENSE-MIT"kind = "translation"usage = "Slovene UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"-sha256 = "9bbbd0d516f284b571ad6e2ed811f6bbdee283cea8483686f4aa939db38ea288"+sha256 = "25f947c54e32c9bc7fb0411ade704fc464fbee7f8a73155f4cf23516311547ce"diff --git a/crates/a11y/src/alt.rs b/crates/a11y/src/alt.rsindex 1f2035405..21bd8448d 100644--- a/crates/a11y/src/alt.rs+++ b/crates/a11y/src/alt.rs@@ -27,6 +27,31 @@ pub enum AltError {Cos(#[from] pdfcraft_cos::CosError),}+/// Why a structure tag cannot safely become an artifact.+#[derive(Debug, thiserror::Error, PartialEq)]+pub enum ArtifactError {+ #[error("the document has no tags")]+ Untagged,+ #[error("object {0} is not a reachable indirect structure tag")]+ NotATag(u32),+ #[error("the tag has child structure elements; mark a leaf tag instead")]+ HasChildren,+ #[error("the tag has no direct marked content")]+ NoMarkedContent,+ #[error("the tag has no page")]+ NoPage,+ #[error("the tag's marked content was not found on its page")]+ ContentNotFound,+ #[error("the tag has no removable structure-tree parent")]+ NoParent,+ #[error("the parent must list the tag exactly once")]+ AmbiguousParent,+ #[error("couldn't update the parent tree: {0}")]+ ParentTree(String),+ #[error(transparent)]+ Cos(#[from] pdfcraft_cos::CosError),+}+pub(crate) fn tree_root(doc: &Document) -> Option<Dict> {let cat = doc.root().and_then(|r| doc.get(r).as_dict().cloned())?;cat.get(b"StructTreeRoot").map(|o| doc.resolve(o)).and_then(|o| o.as_dict().cloned())@@ -305,6 +330,85 @@ pub fn mark_decorative(doc: &mut Document, obj: ObjRef) -> Result<(), AltError>Ok(())}+/// Mark a leaf structure tag's directly owned marked content as an artifact.+///+/// This deliberately refuses a tag with child structure elements. Converting a parent would+/// otherwise silently discard semantic descendants. The visible page content is preserved: each+/// matching marked-content sequence changes from `BDC` with an MCID to `/Artifact BMC`.+pub fn mark_tag_artifact(doc: &mut Document, obj: ObjRef) -> Result<(), ArtifactError> {+ tree_root(doc).ok_or(ArtifactError::Untagged)?;+ let elements = elements(doc);+ let Some(element) = elements.iter().find(|e| e.object == obj) else { return Err(ArtifactError::NotATag(obj.num)) };+ if has_child_structure(doc, &element.dict) {+ return Err(ArtifactError::HasChildren);+ }+ let ids: HashSet<i64> = mcids(&element.dict).into_iter().collect();+ if ids.is_empty() {+ return Err(ArtifactError::NoMarkedContent);+ }+ let pages = pdfcraft_model::pages(doc);+ let page_ref = element.page.ok_or(ArtifactError::NoPage)?;+ let page = pages.iter().find(|page| page.obj == page_ref).ok_or(ArtifactError::NoPage)?;+ let mut ops = pdfcraft_content::parse(&page_content(doc, &page.dict)).ops;+ let mut found = HashSet::new();+ for op in &mut ops {+ let id = (op.op == b"BDC")+ .then(|| match op.operands.get(1) {+ Some(Object::Dict(mark)) => mark.get(b"MCID").and_then(Object::as_int),+ _ => None,+ })+ .flatten()+ .filter(|id| ids.contains(id));+ if let Some(id) = id {+ *op = pdfcraft_content::Op::new("BMC", vec![Object::name("Artifact")]);+ found.insert(id);+ }+ }+ if found != ids {+ return Err(ArtifactError::ContentNotFound);+ }+ let stream = doc.add(Object::Stream(Stream::flate(Dict::new(), &pdfcraft_content::serialize_ops(&ops))));+ doc.update_dict(page.obj, |p| p.set(b"Contents".to_vec(), Object::Ref(stream)))?;+ if let Some(key) = page.dict.get(b"StructParents").and_then(Object::as_int) {+ clear_parent_tree(doc, key, obj).map_err(|e| ArtifactError::ParentTree(e.to_string()))?;+ }+ let parent = element.dict.get(b"P").and_then(Object::as_ref).ok_or(ArtifactError::NoParent)?;+ remove_from_parent(doc, parent, obj)?;+ // Keep the retired object valid if another object holds an out-of-tree reference to it.+ doc.update_dict(obj, |d| {+ d.remove(b"P");+ })?;+ Ok(())+}++fn has_child_structure(doc: &Document, tag: &Dict) -> bool {+ fn child(doc: &Document, item: &Object) -> bool {+ match item {+ Object::Array(items) => items.iter().any(|item| child(doc, item)),+ Object::Ref(r) => doc.get(*r).as_dict().is_some_and(|d| d.contains(b"S")),+ Object::Dict(d) => d.contains(b"S"),+ _ => false,+ }+ }+ tag.get(b"K").is_some_and(|items| child(doc, items))+}++fn remove_from_parent(doc: &mut Document, parent: ObjRef, obj: ObjRef) -> Result<(), ArtifactError> {+ let kids = doc.get(parent).as_dict().and_then(|p| p.get(b"K").cloned()).ok_or(ArtifactError::NoParent)?;+ let replacement = match kids {+ Object::Array(items) => {+ if items.iter().filter(|item| item.as_ref() == Some(obj)).count() != 1 {+ return Err(ArtifactError::AmbiguousParent);+ }+ Object::Array(items.into_iter().filter(|item| item.as_ref() != Some(obj)).collect())+ }+ Object::Ref(r) if r == obj => Object::Array(Vec::new()),+ _ => return Err(ArtifactError::NoParent),+ };+ doc.update_dict(parent, |p| p.set(b"K".to_vec(), replacement))?;+ Ok(())+}+/// Replace `obj` by null in the page's parent-tree array (`key`), in a flat /Nums tree.fn clear_parent_tree(doc: &mut Document, key: i64, obj: ObjRef) -> Result<(), AltError> {let Some(pt) = tree_root(doc).and_then(|r| r.get(b"ParentTree").and_then(Object::as_ref)) else { return Ok(()) };diff --git a/crates/a11y/src/lib.rs b/crates/a11y/src/lib.rsindex 81fbade91..cc3edd60f 100644--- a/crates/a11y/src/lib.rs+++ b/crates/a11y/src/lib.rs@@ -20,7 +20,7 @@ mod report;mod structure;mod tags;-pub use alt::{AltError, Figure, figures, mark_decorative, set_alt};+pub use alt::{AltError, ArtifactError, Figure, figures, mark_decorative, mark_tag_artifact, set_alt};pub use autotag::{AutoTagError, AutoTagResult, autotag_text};pub use headings::{Heading, headings};pub use report::{REPORT_WORDS, report_html};diff --git a/crates/a11y/src/tests.rs b/crates/a11y/src/tests.rsindex e406569a8..6f9deaeb8 100644--- a/crates/a11y/src/tests.rs+++ b/crates/a11y/src/tests.rs@@ -591,6 +591,22 @@ fn setting_alt_text_and_marking_decorative() {assert!(text.contains("/Artifact BMC") && !text.contains("/MCID 0"), "{text}");}+#[test]+fn marking_a_leaf_tag_as_an_artifact_preserves_appearance_and_structure_integrity() {+ let mut doc = figures_doc();+ let page = pdfcraft_model::pages(&doc)[0].obj;+ mark_tag_artifact(&mut doc, pdfcraft_cos::ObjRef::new(7, 0)).unwrap();+ assert_eq!(tags(&doc).into_iter().map(|tag| tag.object.num).collect::<Vec<_>>(), [6, 8]);+ let c = doc.resolve(doc.get(page).as_dict().unwrap().get(b"Contents").unwrap());+ let pdfcraft_cos::Object::Stream(c) = &*c else { panic!("one content stream") };+ let text = String::from_utf8(c.decoded().unwrap()).unwrap();+ assert!(text.contains("/Artifact BMC") && !text.contains("/MCID 0"), "{text}");+ let report = check(&doc, &Options { rules: [Rule::TaggedContent, Rule::FiguresAltText].into(), pages: None });+ assert_eq!(failed(&report), Vec::<Rule>::new(), "{:?}", report.results);+ assert_eq!(mark_tag_artifact(&mut doc, pdfcraft_cos::ObjRef::new(6, 0)), Err(ArtifactError::HasChildren));+ assert_eq!(mark_tag_artifact(&mut doc, pdfcraft_cos::ObjRef::new(7, 0)), Err(ArtifactError::NotATag(7)));+}+fn ref_(n: u32) -> Option<pdfcraft_cos::ObjRef> {Some(pdfcraft_cos::ObjRef::new(n, 0))}diff --git a/crates/automation/src/a11y.rs b/crates/automation/src/a11y.rsindex 71e96131e..6a0e6a195 100644--- a/crates/automation/src/a11y.rs+++ b/crates/automation/src/a11y.rs@@ -476,6 +476,18 @@ impl Automation {self.accessibility_tags(a)}+ pub(crate) fn accessibility_mark_tag_artifact(&mut self, a: &Args) -> Result<Value> {+ let object = u32::try_from(a.int("object")?).map_err(|_| ToolError::InvalidArgs("object must be a positive tag object number".into()))?;+ if object == 0 {+ return Err(ToolError::InvalidArgs("object must be a positive tag object number".into()));+ }+ let generation = u16::try_from(a.int("generation")?)+ .map_err(|_| ToolError::InvalidArgs("generation must be a PDF object generation from accessibility_tags".into()))?;+ let id = self.doc(a)?.id;+ self.session.apply(id, pdfcraft_engine::Edit::MarkTagArtifact { object: pdfcraft_cos::ObjRef::new(object, generation) }).map_err(failed)?;+ self.accessibility_tags(a)+ }+pub(crate) fn accessibility_move_tag(&mut self, a: &Args) -> Result<Value> {let reference = |number: &str, generation: &str| -> Result<pdfcraft_cos::ObjRef> {let n = u32::try_from(a.int(number)?).map_err(|_| ToolError::InvalidArgs(format!("{number} must be a positive tag object number")))?;diff --git a/crates/automation/src/lib.rs b/crates/automation/src/lib.rsindex 4a34909de..247da4a55 100644--- a/crates/automation/src/lib.rs+++ b/crates/automation/src/lib.rs@@ -755,6 +755,7 @@ impl Automation {"accessibility_set_alt" => self.accessibility_set_alt(&a)?,"accessibility_tags" => self.accessibility_tags(&a)?,"accessibility_set_tag_property" => self.accessibility_set_tag_property(&a)?,+ "accessibility_mark_tag_artifact" => self.accessibility_mark_tag_artifact(&a)?,"accessibility_move_tag" => self.accessibility_move_tag(&a)?,"sign_id_create" => self.sign_id_create(&a)?,"sign_document" => self.sign_document(&a)?,diff --git a/crates/automation/src/tools.rs b/crates/automation/src/tools.rsindex cfdeb1c16..1ba549cf0 100644--- a/crates/automation/src/tools.rs+++ b/crates/automation/src/tools.rs@@ -953,6 +953,11 @@ pub fn tools() -> Vec<ToolDef> {"property": { "type": "string", "enum": ["type", "title", "actual_text", "alternate_text", "language"] },"value": { "type": "string" },}), &["doc", "object", "generation", "property"])),+ t("accessibility_mark_tag_artifact", "Mark tag content as artifact", "Mark a reachable leaf structure tag's direct marked content as an artifact and remove the tag from the reading structure. Use object and generation from accessibility_tags. Tags with child structure elements, no direct marked content, or content not found on its page are rejected. Undoable.")+ .with(schema(json!({+ "doc": doc(), "object": { "type": "integer", "minimum": 1 },+ "generation": { "type": "integer", "minimum": 0, "maximum": 65535 },+ }), &["doc", "object", "generation"])),t("accessibility_move_tag", "Move structure tag", "Move a reachable indirect structure tag before or after a direct sibling in their parent's /K array, changing tagged reading order without changing page appearance. Use object and generation values from accessibility_tags. Rejects distinct parents, duplicate references and positions that are already current. Undoable.").with(schema(json!({"doc": doc(), "object": { "type": "integer", "minimum": 1 },diff --git a/crates/automation/tests/automation.rs b/crates/automation/tests/automation.rsindex e788d9610..d44c7ab5b 100644--- a/crates/automation/tests/automation.rs+++ b/crates/automation/tests/automation.rs@@ -2047,6 +2047,40 @@ trailer << /Root 1 0 R >>assert!(matches!(a.call("accessibility_set_alt", &json!({ "doc": fd, "figure": 6, "alt": "x" })), Err(ToolError::Failed(_))));}+#[test]+fn marking_a_leaf_tag_as_an_artifact_through_automation_is_undoable_and_saved() {+ let dir = workdir("a11y-artifact");+ std::fs::write(+ dir.join("tagged.pdf"),+ b"%PDF-1.7+1 0 obj << /Type /Catalog /Pages 2 0 R /MarkInfo << /Marked true >> /StructTreeRoot 5 0 R >> endobj+2 0 obj << /Type /Pages /Kids [3 0 R] /Count 1 >> endobj+3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 200 200] /Contents 4 0 R /StructParents 0 >> endobj+4 0 obj << /Length 48 >> stream+/Figure << /MCID 0 >> BDC 10 150 40 20 re f EMC+endstream endobj+5 0 obj << /Type /StructTreeRoot /K 6 0 R /ParentTree 8 0 R >> endobj+6 0 obj << /S /Document /P 5 0 R /K [7 0 R] >> endobj+7 0 obj << /S /Figure /P 6 0 R /Pg 3 0 R /K 0 >> endobj+8 0 obj << /Nums [0 [7 0 R]] >> endobj+trailer << /Root 1 0 R >>+%%EOF",+ )+ .unwrap();+ let mut a = auto(&dir);+ let doc = ok(&mut a, "doc_open", json!({ "path": "tagged.pdf" }))["doc"].as_u64().unwrap();+ assert_eq!(ok(&mut a, "accessibility_tags", json!({ "doc": doc }))["count"], 2);+ let tagged = ok(&mut a, "accessibility_mark_tag_artifact", json!({ "doc": doc, "object": 7, "generation": 0 }));+ assert_eq!(tagged["count"], 1);+ assert_eq!(ok(&mut a, "accessibility_check", json!({ "doc": doc, "rules": ["tagged-content"] }))["failed"], 0);+ ok(&mut a, "doc_save", json!({ "doc": doc, "path": "artifact.pdf" }));+ let saved = pdfcraft_cos::Document::open(std::sync::Arc::new(std::fs::read(dir.join("artifact.pdf")).unwrap())).unwrap();+ assert_eq!(pdfcraft_engine::a11y::tags(&saved).len(), 1);+ assert_eq!(ok(&mut a, "edit_undo", json!({ "doc": doc }))["undone"], "Mark content as artifact");+ assert_eq!(ok(&mut a, "accessibility_tags", json!({ "doc": doc }))["count"], 2);+ assert!(matches!(a.call("accessibility_mark_tag_artifact", &json!({ "doc": doc, "object": 6, "generation": 0 })), Err(ToolError::Failed(_))));+}+#[test]fn accessibility_review_record_compares_two_versions_without_changing_them() {let dir = workdir("a11y-review-record");diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rsindex 651cd21af..19f18fea9 100644--- a/crates/engine/src/lib.rs+++ b/crates/engine/src/lib.rs@@ -1359,6 +1359,10 @@ pub enum Edit {MarkDecorative {figure: u32,},+ /// Tags panel ▸ Mark as artifact: retire a leaf tag and mark its content as an artifact.+ MarkTagArtifact {+ object: pdfcraft_cos::ObjRef,+ },/// Document JavaScripts: add, replace (`script`) or remove (`None`) the document-level/// script `name`.SetDocumentScript {@@ -1823,6 +1827,7 @@ impl Edit {Edit::SetTagProperty { .. } => Label::of("Change tag properties"),Edit::MoveTag { .. } => Label::of("Move object"),Edit::MarkDecorative { .. } => Label::of("Mark figure as decorative"),+ Edit::MarkTagArtifact { .. } => Label::of("Mark content as artifact"),Edit::AddOcrText { .. } => Label::of("Recognize text"),Edit::ApplyScriptChanges { .. } => Label::of("Run JavaScript"),Edit::XfaEvent { .. } => Label::of("Run form script"),@@ -2012,6 +2017,7 @@ fn check_permission(edit: &Edit, p: &pdfcraft_cos::Permissions) -> Result<(), Ed| Edit::SetTagProperty { .. }| Edit::MoveTag { .. }| Edit::MarkDecorative { .. }+ | Edit::MarkTagArtifact { .. }| Edit::AddOcrText { .. }| Edit::SetDocumentScript { .. }| Edit::SetFieldScript { .. }@@ -2351,6 +2357,9 @@ fn run_edit(doc: &mut pdfcraft_cos::Document, edit: &Edit, cx: &mut EditCtx) ->let r = pdfcraft_cos::ObjRef::new(*figure, doc.generation(*figure));a11y::mark_decorative(doc, r).map_err(|e| EditError::Accessibility(e.to_string()))?;}+ Edit::MarkTagArtifact { object } => {+ a11y::mark_tag_artifact(doc, *object).map_err(|e| EditError::Accessibility(e.to_string()))?;+ }Edit::AddHeaderFooter { pages, settings, replace } => {let date = cx.today;pdfcraft_edit::add_header_footer(doc, pages, settings, *replace, &pdfcraft_edit::Context { date })?;diff --git a/crates/ui-egui/src/i18n/ar.tsv b/crates/ui-egui/src/i18n/ar.tsvindex a8c7d5382..ca8fe40e1 100644--- a/crates/ui-egui/src/i18n/ar.tsv+++ b/crates/ui-egui/src/i18n/ar.tsv@@ -2375,3 +2375,6 @@ animation effects Off معطّلةThis document is trying to open a local file: يحاول هذا المستند فتح ملف محلي:Move tag earlier نقل العلامة للأعلىMove tag later نقل العلامة للأسفل+ Mark as artifact وضع علامة كعنصر زخرفي+ Remove this leaf tag from reading order and mark its direct content as an artifact أزل هذه العلامة من ترتيب القراءة وضع علامة على محتواها المباشر كعنصر زخرفي+ Mark content as artifact وضع علامة على المحتوى كعنصر زخرفيdiff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsvindex e107408e2..706bfe2ca 100644--- a/crates/ui-egui/src/i18n/bg.tsv+++ b/crates/ui-egui/src/i18n/bg.tsv@@ -2317,3 +2317,6 @@ animation effects Off ИзключениThis document is trying to open a local file: Този документ се опитва да отвори локален файл:Move tag earlier Преместване на етикета по-раноMove tag later Преместване на етикета по-късно+ Mark as artifact Маркиране като артефакт+ Remove this leaf tag from reading order and mark its direct content as an artifact Премахнете този листов етикет от реда на четене и маркирайте прякото му съдържание като артефакт+ Mark content as artifact Маркиране на съдържание като артефактdiff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsvindex 835388f40..547dea259 100644--- a/crates/ui-egui/src/i18n/cs.tsv+++ b/crates/ui-egui/src/i18n/cs.tsv@@ -2428,3 +2428,6 @@ animation effects Off VypnutoThis document is trying to open a local file: Tento dokument se pokouší otevřít místní soubor:Move tag earlier Přesunout značku dříveMove tag later Přesunout značku později+ Mark as artifact Označit jako artefakt+ Remove this leaf tag from reading order and mark its direct content as an artifact Odeberte tuto značku listu z pořadí čtení a označte její přímý obsah jako artefakt+ Mark content as artifact Označit obsah jako artefaktdiff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsvindex 7a418b54e..289a6ee93 100644--- a/crates/ui-egui/src/i18n/de.tsv+++ b/crates/ui-egui/src/i18n/de.tsv@@ -2355,3 +2355,6 @@ animation effects Off AusThis document is trying to open a local file: Dieses Dokument versucht, eine lokale Datei zu öffnen:Move tag earlier Tag früher verschiebenMove tag later Tag später verschieben+ Mark as artifact Als Artefakt markieren+ Remove this leaf tag from reading order and mark its direct content as an artifact Dieses Blatt-Tag aus der Lesereihenfolge entfernen und seinen direkten Inhalt als Artefakt markieren+ Mark content as artifact Inhalt als Artefakt markierendiff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsvindex 3a99376d6..341637c85 100644--- a/crates/ui-egui/src/i18n/el.tsv+++ b/crates/ui-egui/src/i18n/el.tsv@@ -2364,3 +2364,6 @@ animation effects Off ΑνενεργάThis document is trying to open a local file: Αυτό το έγγραφο προσπαθεί να ανοίξει ένα τοπικό αρχείο:Move tag earlier Μετακίνηση ετικέτας νωρίτεραMove tag later Μετακίνηση ετικέτας αργότερα+ Mark as artifact Σήμανση ως τεχνούργημα+ Remove this leaf tag from reading order and mark its direct content as an artifact Αφαιρέστε αυτήν την ετικέτα φύλλου από τη σειρά ανάγνωσης και σημειώστε το άμεσο περιεχόμενό της ως τεχνούργημα+ Mark content as artifact Σήμανση περιεχομένου ως τεχνούργημαdiff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsvindex f69380564..b904e8034 100644--- a/crates/ui-egui/src/i18n/es.tsv+++ b/crates/ui-egui/src/i18n/es.tsv@@ -2484,3 +2484,6 @@ animation effects Off DesactivadosThis document is trying to open a local file: Este documento intenta abrir un archivo local:Move tag earlier Mover etiqueta antesMove tag later Mover etiqueta después+ Mark as artifact Marcar como artefacto+ Remove this leaf tag from reading order and mark its direct content as an artifact Quite esta etiqueta hoja del orden de lectura y marque su contenido directo como artefacto+ Mark content as artifact Marcar contenido como artefactodiff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsvindex 76be27ca7..6d1140e4a 100644--- a/crates/ui-egui/src/i18n/fr.tsv+++ b/crates/ui-egui/src/i18n/fr.tsv@@ -2354,3 +2354,6 @@ animation effects Off DésactivésThis document is trying to open a local file: Ce document tente d’ouvrir un fichier local :Move tag earlier Déplacer la balise plus tôtMove tag later Déplacer la balise plus tard+ Mark as artifact Marquer comme artefact+ Remove this leaf tag from reading order and mark its direct content as an artifact Retirez cette balise feuille de l’ordre de lecture et marquez son contenu direct comme artefact+ Mark content as artifact Marquer le contenu comme artefactdiff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsvindex 221ad21f9..38744f2e0 100644--- a/crates/ui-egui/src/i18n/hu.tsv+++ b/crates/ui-egui/src/i18n/hu.tsv@@ -2353,3 +2353,6 @@ animation effects Off KiThis document is trying to open a local file: Ez a dokumentum egy helyi fájlt próbál megnyitni:Move tag earlier Címke korábbra helyezéseMove tag later Címke későbbre helyezése+ Mark as artifact Megjelölés műtárgyként+ Remove this leaf tag from reading order and mark its direct content as an artifact Távolítsa el ezt a levélcímkét az olvasási sorrendből, és jelölje meg a közvetlen tartalmát műtárgyként+ Mark content as artifact Tartalom megjelölése műtárgykéntdiff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsvindex 94eeab157..01beadf96 100644--- a/crates/ui-egui/src/i18n/it.tsv+++ b/crates/ui-egui/src/i18n/it.tsv@@ -2363,3 +2363,6 @@ animation effects Off DisattivatiThis document is trying to open a local file: Questo documento sta tentando di aprire un file locale:Move tag earlier Sposta tag primaMove tag later Sposta tag dopo+ Mark as artifact Segna come artefatto+ Remove this leaf tag from reading order and mark its direct content as an artifact Rimuovi questo tag foglia dall'ordine di lettura e segna il suo contenuto diretto come artefatto+ Mark content as artifact Segna il contenuto come artefattodiff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsvindex 777410e90..feb2bc821 100644--- a/crates/ui-egui/src/i18n/ja.tsv+++ b/crates/ui-egui/src/i18n/ja.tsv@@ -2354,3 +2354,6 @@ animation effects Off オフThis document is trying to open a local file: この文書はローカルファイルを開こうとしています:Move tag earlier タグを前へ移動Move tag later タグを後へ移動+ Mark as artifact アーティファクトとしてマーク+ Remove this leaf tag from reading order and mark its direct content as an artifact このリーフタグを読み上げ順序から削除し、その直接のコンテンツをアーティファクトとしてマークします+ Mark content as artifact コンテンツをアーティファクトとしてマークdiff --git a/crates/ui-egui/src/i18n/kk.tsv b/crates/ui-egui/src/i18n/kk.tsvindex 2ce5830af..09187a460 100644--- a/crates/ui-egui/src/i18n/kk.tsv+++ b/crates/ui-egui/src/i18n/kk.tsv@@ -2352,3 +2352,6 @@ animation effects Off ӨшіруліThis document is trying to open a local file: Бұл құжат жергілікті файлды ашуға әрекеттеніп жатыр:Move tag earlier Тегті ертерек жылжытуMove tag later Тегті кейінірек жылжыту+ Mark as artifact Артефакт ретінде белгілеу+ Remove this leaf tag from reading order and mark its direct content as an artifact Осы жапырақ тегін оқу ретінен алып тастап, оның тікелей мазмұнын артефакт ретінде белгілеңіз+ Mark content as artifact Мазмұнды артефакт ретінде белгілеуdiff --git a/crates/ui-egui/src/i18n/lt.tsv b/crates/ui-egui/src/i18n/lt.tsvindex 36c698c81..2f723a452 100644--- a/crates/ui-egui/src/i18n/lt.tsv+++ b/crates/ui-egui/src/i18n/lt.tsv@@ -2598,3 +2598,6 @@ key Space TarpasThis document is trying to open a local file: Šis dokumentas bando atverti vietinį failą:Move tag earlier Perkelti žymą anksčiauMove tag later Perkelti žymą vėliau+ Mark as artifact Pažymėti kaip artefaktą+ Remove this leaf tag from reading order and mark its direct content as an artifact Pašalinkite šią lapo žymą iš skaitymo tvarkos ir pažymėkite jos tiesioginį turinį kaip artefaktą+ Mark content as artifact Pažymėti turinį kaip artefaktądiff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsvindex b443c8415..7dd7c0dba 100644--- a/crates/ui-egui/src/i18n/pl.tsv+++ b/crates/ui-egui/src/i18n/pl.tsv@@ -2334,3 +2334,6 @@ animation effects Off WyłączoneThis document is trying to open a local file: Ten dokument próbuje otworzyć plik lokalny:Move tag earlier Przenieś znacznik wcześniejMove tag later Przenieś znacznik później+ Mark as artifact Oznacz jako artefakt+ Remove this leaf tag from reading order and mark its direct content as an artifact Usuń ten znacznik liścia z kolejności odczytu i oznacz jego bezpośrednią zawartość jako artefakt+ Mark content as artifact Oznacz zawartość jako artefaktdiff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsvindex 9b2a68394..261a86810 100644--- a/crates/ui-egui/src/i18n/pt-br.tsv+++ b/crates/ui-egui/src/i18n/pt-br.tsv@@ -2368,3 +2368,6 @@ animation effects Off DesativadosThis document is trying to open a local file: Este documento está tentando abrir um arquivo local:Move tag earlier Mover tag para antesMove tag later Mover tag para depois+ Mark as artifact Marcar como artefato+ Remove this leaf tag from reading order and mark its direct content as an artifact Remova esta tag folha da ordem de leitura e marque seu conteúdo direto como artefato+ Mark content as artifact Marcar conteúdo como artefatodiff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsvindex 834e55282..890e72e9a 100644--- a/crates/ui-egui/src/i18n/ru.tsv+++ b/crates/ui-egui/src/i18n/ru.tsv@@ -2267,3 +2267,6 @@ animation effects Off ВыклThis document is trying to open a local file: Этот документ пытается открыть локальный файл:Move tag earlier Переместить тег раньшеMove tag later Переместить тег позже+ Mark as artifact Пометить как артефакт+ Remove this leaf tag from reading order and mark its direct content as an artifact Удалите этот конечный тег из порядка чтения и пометьте его непосредственное содержимое как артефакт+ Mark content as artifact Пометить содержимое как артефактdiff --git a/crates/ui-egui/src/i18n/sl.tsv b/crates/ui-egui/src/i18n/sl.tsvindex 506e52ee4..adafdca00 100644--- a/crates/ui-egui/src/i18n/sl.tsv+++ b/crates/ui-egui/src/i18n/sl.tsv@@ -2359,3 +2359,6 @@ animation effects Off IzklopljeniThis document is trying to open a local file: Ta dokument poskuša odpreti lokalno datoteko:Move tag earlier Premakni oznako prejMove tag later Premakni oznako pozneje+ Mark as artifact Označi kot artefakt+ Remove this leaf tag from reading order and mark its direct content as an artifact Odstranite to listno oznako iz vrstnega reda branja in označite njeno neposredno vsebino kot artefakt+ Mark content as artifact Označi vsebino kot artefaktdiff --git a/crates/ui-egui/src/i18n/te.tsv b/crates/ui-egui/src/i18n/te.tsvindex 08c53e84f..6a56688ac 100644--- a/crates/ui-egui/src/i18n/te.tsv+++ b/crates/ui-egui/src/i18n/te.tsv@@ -2267,3 +2267,6 @@ animation effects Off ఆఫ్This document is trying to open a local file: ఈ పత్రం ఒక స్థానిక ఫైల్ను తెరవడానికి ప్రయత్నిస్తోంది:Move tag earlier ట్యాగ్ను ముందుకు తరలించుMove tag later ట్యాగ్ను వెనుకకు తరలించు+ Mark as artifact ఆర్టిఫాక్ట్గా గుర్తించు+ Remove this leaf tag from reading order and mark its direct content as an artifact ఈ లీఫ్ ట్యాగ్ను పఠన క్రమం నుంచి తీసివేసి, దాని ప్రత్యక్ష కంటెంట్ను ఆర్టిఫాక్ట్గా గుర్తించండి+ Mark content as artifact కంటెంట్ను ఆర్టిఫాక్ట్గా గుర్తించుdiff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsvindex eb03e7f99..af37483b4 100644--- a/crates/ui-egui/src/i18n/tr.tsv+++ b/crates/ui-egui/src/i18n/tr.tsv@@ -2350,3 +2350,6 @@ animation effects Off KapalıThis document is trying to open a local file: Bu belge yerel bir dosya açmaya çalışıyor:Move tag earlier Etiketi daha erken taşıMove tag later Etiketi daha geç taşı+ Mark as artifact Yapıt olarak işaretle+ Remove this leaf tag from reading order and mark its direct content as an artifact Bu yaprak etiketini okuma sırasından kaldırın ve doğrudan içeriğini yapıt olarak işaretleyin+ Mark content as artifact İçeriği yapıt olarak işaretlediff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsvindex eb1cea0e1..c0c4e83d1 100644--- a/crates/ui-egui/src/i18n/uk.tsv+++ b/crates/ui-egui/src/i18n/uk.tsv@@ -2376,3 +2376,6 @@ animation effects Off ВимкненоThis document is trying to open a local file: Цей документ намагається відкрити локальний файл:Move tag earlier Перемістити тег ранішеMove tag later Перемістити тег пізніше+ Mark as artifact Позначити як артефакт+ Remove this leaf tag from reading order and mark its direct content as an artifact Вилучіть цей кінцевий тег із порядку читання та позначте його безпосередній вміст як артефакт+ Mark content as artifact Позначити вміст як артефактdiff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsvindex d13078e7a..f914db633 100644--- a/crates/ui-egui/src/i18n/zh-hans.tsv+++ b/crates/ui-egui/src/i18n/zh-hans.tsv@@ -2318,3 +2318,6 @@ animation effects Off 关This document is trying to open a local file: 此文档正尝试打开本地文件:Move tag earlier 将标签前移Move tag later 将标签后移+ Mark as artifact 标记为工件+ Remove this leaf tag from reading order and mark its direct content as an artifact 从阅读顺序中移除此叶标签,并将其直接内容标记为工件+ Mark content as artifact 将内容标记为工件diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsvindex 9f8856ae1..7e49a5e69 100644--- a/crates/ui-egui/src/i18n/zh-hant.tsv+++ b/crates/ui-egui/src/i18n/zh-hant.tsv@@ -2228,3 +2228,6 @@ animation effects Off 關This document is trying to open a local file: 此文件正嘗試開啟本機檔案:Move tag earlier 將標記前移Move tag later 將標記後移+ Mark as artifact 標記為成品+ Remove this leaf tag from reading order and mark its direct content as an artifact 從閱讀順序中移除此葉標記,並將其直接內容標記為成品+ Mark content as artifact 將內容標記為成品diff --git a/crates/ui-egui/src/tags_ui.rs b/crates/ui-egui/src/tags_ui.rsindex 2fe917f7c..b72a6520b 100644--- a/crates/ui-egui/src/tags_ui.rs+++ b/crates/ui-egui/src/tags_ui.rs@@ -191,10 +191,14 @@ pub(crate) fn panel(ui: &mut Ui, t: &Tokens, doc: DocId, tags: &[TagInfo], statestate.draft = Draft::from_tag(tag);}});- let (mut earlier, mut later) = (false, false);+ let (mut earlier, mut later, mut artifact) = (false, false, false);ui.horizontal(|ui| {earlier = ui.add_enabled(can_edit && !dirty && before.is_some(), egui::Button::new(tl!("Move tag earlier"))).clicked();later = ui.add_enabled(can_edit && !dirty && after.is_some(), egui::Button::new(tl!("Move tag later"))).clicked();+ artifact = ui+ .add_enabled(can_edit && !dirty, egui::Button::new(tl!("Mark as artifact")))+ .on_hover_text(tl!("Remove this leaf tag from reading order and mark its direct content as an artifact"))+ .clicked();});(page,@@ -204,6 +208,8 @@ pub(crate) fn panel(ui: &mut Ui, t: &Tokens, doc: DocId, tags: &[TagInfo], statebefore.map(|anchor| Edit::MoveTag { object: tag.object, anchor: anchor.object, placement: TagPlacement::Before })} else if later {after.map(|anchor| Edit::MoveTag { object: tag.object, anchor: anchor.object, placement: TagPlacement::After })+ } else if artifact {+ Some(Edit::MarkTagArtifact { object: tag.object })} else {None},diff --git a/crates/ui-egui/tests/accessibility.rs b/crates/ui-egui/tests/accessibility.rsindex 6872ab470..e90b2dcf2 100644--- a/crates/ui-egui/tests/accessibility.rs+++ b/crates/ui-egui/tests/accessibility.rs@@ -337,6 +337,27 @@ fn tags_panel_moves_a_tag_within_its_siblings() {assert_eq!(doc.can_undo(), Some("Move object"));}+#[test]+fn tags_panel_marks_a_leaf_tag_as_an_artifact() {+ let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(move |_cc| {+ let mut app = PdfCraftApp::new();+ app.set_option("language", "en").unwrap();+ app.open_bytes("figures.pdf", None, FIGURES.to_vec()).unwrap();+ app+ });+ h.run_steps(4);+ assert!(h.state_mut().execute("a11y.tags"));+ h.run_steps(2);+ h.get_by_label("Figure · 7").click();+ h.run_steps(1);+ h.get_by_label("Mark as artifact").click();+ h.run_steps(3);+ let s = h.state();+ let doc = s.session.get(s.views[0].id).unwrap();+ assert_eq!(doc.tags().into_iter().map(|tag| tag.object.num).collect::<Vec<_>>(), [6, 8]);+ assert_eq!(doc.can_undo(), Some("Mark content as artifact"));+}+#[test]fn checker_finding_opens_its_structure_tag() {let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).build_eframe(move |_cc| {diff --git a/parity/acrobat-features.toml b/parity/acrobat-features.tomlindex 93f62a4ca..22ee2c66d 100644--- a/parity/acrobat-features.toml+++ b/parity/acrobat-features.toml@@ -8945,11 +8945,11 @@ title = "Mark content as artifact"area = "M"tier = "P1"milestone = "M12"-status = "planned"-commands = []-tools = []-evidence = []-notes = ""+status = "partial"+commands = ["a11y.tags"]+tools = ["accessibility_mark_tag_artifact"]+evidence = ["crates/a11y/src/tests.rs::marking_a_leaf_tag_as_an_artifact_preserves_appearance_and_structure_integrity", "crates/automation/tests/automation.rs::marking_a_leaf_tag_as_an_artifact_through_automation_is_undoable_and_saved", "crates/ui-egui/tests/accessibility.rs::tags_panel_marks_a_leaf_tag_as_an_artifact"]+notes = "Tags panel and automation can retire a reachable indirect leaf tag that owns direct MCIDs: its visible page content remains but becomes /Artifact and the parent-tree references are cleared. Tags with structural children, non-MCID content, missing pages or ambiguous parents are refused. Arbitrary painted-content selection, direct structure dictionaries and removing whole tagged subtrees remain unsupported."[[feature]]id = "a11y.find-untagged"