Skip to content

Expose the table structure attributes in the struct tree - #21702

Merged
calixteman merged 1 commit into
mozilla:masterfrom
calixteman:fix/table-structure-attributes
Aug 7, 2026
Merged

Expose the table structure attributes in the struct tree#21702
calixteman merged 1 commit into
mozilla:masterfrom
calixteman:fix/table-structure-attributes

Conversation

@calixteman

Copy link
Copy Markdown
Contributor

Preserve RowSpan, ColSpan, Headers, Scope, Short and Summary when serializing the structure tree, and map them to the corresponding ARIA attributes in the viewer.

The attributes are now collected from both the A and the C entries, which may be arrays interleaving dictionaries and revision numbers: this also fixes the bounding box and the MS Office MathML lookups, which only handled a single direct dictionary.

Fixes #18090.

@codecov-commenter

codecov-commenter commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.77419% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.04%. Comparing base (5ca8134) to head (240bfee).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/core/struct_tree.js 96.66% 3 Missing ⚠️
web/struct_tree_layer_builder.js 96.92% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #21702    +/-   ##
========================================
  Coverage   90.04%   90.04%            
========================================
  Files         264      264            
  Lines       66899    67037   +138     
========================================
+ Hits        60237    60365   +128     
- Misses       6662     6672    +10     
Flag Coverage Δ
browsertest 66.35% <0.64%> (-0.14%) ⬇️
fonttest 9.03% <ø> (ø)
integrationtest 69.34% <69.67%> (-0.03%) ⬇️
unittest 58.09% <94.83%> (+0.20%) ⬆️
unittestcli 56.64% <56.12%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/core/struct_tree.js Outdated
Comment thread web/struct_tree_layer_builder.js Outdated

@timvandermeij timvandermeij left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with one optional comment. Thanks!

Comment thread src/core/struct_tree.js Outdated
Preserve `RowSpan`, `ColSpan`, `Headers`, `Scope`, `Short` and `Summary`
when serializing the structure tree, and map them to the corresponding
ARIA attributes in the viewer.

The attributes are now collected from both the `A` and the `C` entries,
which may be arrays interleaving dictionaries and revision numbers: this
also fixes the bounding box and the MS Office MathML lookups, which only
handled a single direct dictionary.

Fixes mozilla#18090.
@calixteman
calixteman force-pushed the fix/table-structure-attributes branch from b586316 to 240bfee Compare August 4, 2026 19:22
@calixteman
calixteman merged commit b8a4fbd into mozilla:master Aug 7, 2026
21 checks passed
@calixteman
calixteman deleted the fix/table-structure-attributes branch August 7, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Structure tree doesn't retain Colspan and Rowspan

4 participants