Skip to content

DEV-4180: Describe a formula error cell with a short message, popup open or closed - #1914

Merged
Haxikowy merged 5 commits into
developfrom
fix/dev-4180-error-cell-description
Dec 2, 2026
Merged

Haxikowy merged 5 commits into
developfrom
fix/dev-4180-error-cell-description

Conversation

@Haxikowy

@Haxikowy Haxikowy commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Context

The PR fixes how a screen reader describes a formula error cell in hyperformula-ui.

  • Why: in 0.3.7 the cell points at the error popup only while it is open. After Escape, the error is not read. With the popup open, the reader hears the code twice and the full engine message.
  • What changed:
    • ui/popup/errorDescriptions.ts (new): one MutationObserver on the grid root links each [data-hfe-error] cell to a hidden node through aria-describedby. Cells with the same text share a node.
    • ui/popup/cellError.ts: toErrorDescription() keeps the first sentence after the code, at most 120 characters. A bare code like #DIV/0! gets no description.
    • ui/popup/errorPopup.ts: the popup is visual only. No aria-errormessage: axe rejects it on a hidden node.
    • dev-docs/ARCHITECTURE.md, dev-docs/SPEC.md: the error display policy.
  • Result: the reader hears the column header, then the short message, once, with the popup open or closed.

The observer writes after the host's render, so a host id written after the renderer stays first. It removes only its own id.

=FOO(1), Chromium description 0.3.7 This PR
Popup open C #NAME? Function name FOO not recognized. C Function name FOO not recognized.
After Escape C C Function name FOO not recognized.
=1+ C #ERROR! Parsing error. Expecting: … (12 tokens) C Parsing error.

How did you test your changes?

  • npm run build:ui, npm run typecheck, npm run test:ui: 1197 tests passed. error-descriptions.test.ts is new. 13 tests of the popup id link were removed.
  • Handsontable develop with this build linked in: the formula builder E2E specs pass, except two that assert the 0.3.7 popup id link.
  • A Chromium accessibility-tree check covered Escape, =1+, =1/0, shared errors, cell reuse on scroll and colHeaders: false. axe reports nothing on the error cell.

AI assistance

Claude Code wrote the code, the tests and the dev-docs changes.

Compatibility with Excel and Google Sheets

Not applicable.

Formula Excel Google Sheets HyperFormula

Public API changes

None. The cell no longer gets aria-errormessage, and aria-describedby points at a hidden node instead of the popup.

Out of scope and follow-ups

  • Handsontable updates its two E2E expectations after a release.
  • The cellError announcement ends in two periods ("not recognized.."). Separate fix.
  • With Handsontable's ariaTags: false, the cell still gets the link. The cell is not focusable there.

Types of changes

  • Breaking change (existing functionality no longer works as before) – agreed with the maintainers
  • New feature or improvement (a non-breaking change that adds functionality)
  • Bug fix (a non-breaking change that fixes an issue)
  • Additional language file, or a change to an existing language file (translations)
  • Change to the documentation

Related issues

  1. DEV-4180

Checklist

@Haxikowy Haxikowy self-assigned this Nov 24, 2026
@Haxikowy Haxikowy added Bug Something isn't working Integration with HOT labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Performance comparison of head (8d9deda) vs base (20ca836)

                                     testName |    base |    head |  change
---------------------------------------------------------------------------
                                      Sheet A |  324.36 |  319.47 |  -1.51%
                                      Sheet B |   98.86 |    99.2 |  +0.34%
                                      Sheet T |    90.2 |   89.04 |  -1.29%
                                Column ranges |  455.41 |  454.39 |  -0.22%
                                Sorted lookup | 14937.8 | 15771.1 |  +5.58%
Sheet A:  change value, add/remove row/column |    9.37 |   10.44 | +11.42%
 Sheet B: change value, add/remove row/column |   84.01 |   83.23 |  -0.93%
                   Column ranges - add column |  101.38 |   99.39 |  -1.96%
                Column ranges - without batch |  328.77 |  323.42 |  -1.63%
                        Column ranges - batch |   83.24 |   80.63 |  -3.14%

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
hyperformula-docs 8d9deda Commit Preview URL

Branch Preview URL
Dec 02 2026, 11:59 AM

@Haxikowy
Haxikowy marked this pull request as ready for review November 24, 2026 17:14

@handsontable-pr-review handsontable-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

Medium risk: Runtime a11y behavior in the hyperformula-ui error-cell path: a new always-on MutationObserver on the grid root and rewritten ARIA linking, scoped to the formula-builder UI package (no engine/data/security paths), but active on every host grid render.

Full review: no issues found.

Want a deeper review? Comment /review improve on its own line: a full review of the latest commit with an extra fix-oriented pass (about 2x the cost).

@Haxikowy
Haxikowy force-pushed the fix/dev-4180-error-cell-description branch from 5bff4d9 to 9971de5 Compare November 24, 2026 17:44

@handsontable-pr-review handsontable-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

Medium risk: Reworks the error-cell accessibility wiring (MutationObserver-driven aria-describedby links replacing aria-errormessage) in product runtime code, but the change is confined to the error-popup path and is well covered by new unit tests.

Full review: no issues found.

Want a deeper review? Comment /review improve on its own line: a full review of the latest commit with an extra fix-oriented pass (about 2x the cost).

@Haxikowy
Haxikowy force-pushed the fix/dev-4180-error-cell-description branch from 9971de5 to ff957d7 Compare November 25, 2026 13:20

@handsontable-pr-review handsontable-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

Medium risk: Reworks the error-cell accessibility wiring (aria-errormessage removed, new MutationObserver-driven aria-describedby descriptions) in shipped runtime UI code, so screen-reader behaviour and host attribute handling could regress, though the blast radius is limited to error-cell a11y.

Full review: 1 potential issue(s).

Want a deeper review? Comment /review improve on its own line: a full review of the latest commit with an extra fix-oriented pass (about 2x the cost).

@adrianspdev adrianspdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Checked out the branch and verified it in Chromium against a small grid that renders cells the way Handsontable does (strips aria-* on each draw, adds the column-header id only when aria-describedby is empty). The accessible description is correct with the popup open, after Escape, after a host re-render, after a cell is fixed, on cell reuse, and for a cell inserted after it was marked; host-written ids and aria-errormessage survive, and destroy() cleans up. No observer loop. The new tests fail with the fix reverted.

nit: the description says 1188 tests passed; the current head runs 1192.

@marcin-kordas-hoc marcin-kordas-hoc 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.

Error cells now get a short description whether or not the popup is open. A small suggestion below. nit: the branch now conflicts with develop in hyperformula-ui/CHANGELOG.md.

@Haxikowy
Haxikowy force-pushed the fix/dev-4180-error-cell-description branch from af72613 to 8d9deda Compare December 2, 2026 11:57
@Haxikowy
Haxikowy enabled auto-merge (squash) December 2, 2026 12:00
@codecov

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.76%. Comparing base (20ca836) to head (8d9deda).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1914   +/-   ##
========================================
  Coverage    97.76%   97.76%           
========================================
  Files          212      212           
  Lines        19312    19312           
  Branches      4561     4595   +34     
========================================
  Hits         18881    18881           
- Misses         423      431    +8     
+ Partials         8        0    -8     

see 5 files with indirect coverage changes

🚀 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.

@Haxikowy
Haxikowy merged commit 867d3fb into develop Dec 2, 2026
35 checks passed
@Haxikowy
Haxikowy deleted the fix/dev-4180-error-cell-description branch December 2, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Integration with HOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants