forked from scanny/python-pptx
-
Notifications
You must be signed in to change notification settings - Fork 0
[Epic] Accessibility (a11y) — alt text, decorative flag, reading order #22
Copy link
Copy link
Closed
Labels
area:a11yFeature area: a11yFeature area: a11yepicMulti-feature roadmap epicMulti-feature roadmap epicprior-art:forkActive community fork has shipped thisActive community fork has shipped thisprior-art:upstream-prOpen PR on scanny/python-pptx is candidate cherry-pickOpen PR on scanny/python-pptx is candidate cherry-pickpriority:P0Highest user demand or strategic valueHighest user demand or strategic valuestatus:quick-winHigh user demand, small implementationHigh user demand, small implementation
Milestone
Metadata
Metadata
Assignees
Labels
area:a11yFeature area: a11yFeature area: a11yepicMulti-feature roadmap epicMulti-feature roadmap epicprior-art:forkActive community fork has shipped thisActive community fork has shipped thisprior-art:upstream-prOpen PR on scanny/python-pptx is candidate cherry-pickOpen PR on scanny/python-pptx is candidate cherry-pickpriority:P0Highest user demand or strategic valueHighest user demand or strategic valuestatus:quick-winHigh user demand, small implementationHigh user demand, small implementation
Problem
Accessibility is the lowest-hanging fork-leverage fruit for enterprise / government adoption. Section 508 / WCAG / ADA compliance requires alt text on every non-decorative shape. Today:
descr=andtitle=attributes on<p:cNvPr>round-trip on read for pictures only, but no publicShape.alt_textgetter/setter exists across the broader shape hierarchy. The "Mark as decorative" flag (Office 2019+) is unsupported. Reading order — which screen-readers depend on for slide narration — has no API. Issue scanny/python-pptx#508 covers alt text for ALL objects, and there is a clean shortlist-labeled PR sitting open (scanny/python-pptx#911 by pa-t, with scanny himself flagging itshortlist). This is the canonical quick-win epic.Sub-features
Shape.alt_textgetter+setter writing to<p:cNvPr descr=>(read existing data; create attribute if missing)Shape.alt_titlegetter+setter for<p:cNvPr title=>(separate from descr per Microsoft accessibility guidance)Shape.is_decorativeboolean — emits<adec:decorative val="1"/>in<a:extLst>(Office 2019+)Slide.shapes.reading_orderreturns iterable in tab-order; setter to reorder via<p:nvSpPr>/<p:cNvPr>IDs and the slide's<p:tabLst>Shape.is_hidden_from_accessibility— alias / convenience for is_decorativeSlide.accessibility_issues()returns shapes lacking alt-text or marked-decorativePrior art
shortlistlabel by scanny himself, last activity 2025-07-31). Highest-quality cherry-pick candidate. scanny/python-pptx#1097 lower-quality variant. scanny/python-pptx#512 older. scanny/python-pptx#567 title/descr/hidden predecessor.semaverse-ai/semaverse-pptxfeat(shapes): raw alt-text accessors— modernized variant.<p:cNvPr>(descr,titleattrs), DrawingML extLst with<adec:decorative val="1"/>namespacehttp://schemas.microsoft.com/office/drawing/2017/decorative. Reading order: PresentationML<p:tabLst>(rare, fallback is shape z-order).src/pptx/shapes/base.py,src/pptx/oxml/shapes/__init__.py, newsrc/pptx/accessibility.pyfor the lint helper.Acceptance criteria
picture.alt_text = "Bar chart of Q3 revenue by region"writes the descr attribute and round-trips.slide.accessibility_issues()returns an empty list for a fully-tagged slide.Effort: S — quick-win
Cherry-pick scanny#911 as Phase A; decorative + reading-order are Phase B.
Labels
status:quick-win,priority:P0— high enterprise demand, small implementation. Pair with Transparency epic as fastest first releases.