Repository navigation
fix(ui): keep the alert type word in the accessible name on every engine (ui 0.38.2) - #1511
Merged
Merged
Conversation
…ine (ui 0.38.2) ui 0.38.1 named a titled alert's row with aria-label="<Type>: <title>" on a plain div. ARIA prohibits naming a generic element: Chrome exposes it, WebKit drops it, so VoiceOver on Safari read only the bold title and lost the type word that 0.37.0 showed as text. The type word now rides a visually hidden sr-only span before the title, which every engine reads. Also: the alertIconRenderer seam was consulted even when the title line carried an emoji (its result was discarded, so rendering was right, but the contract says it is not called); it is now called only for a title line with an icon comment and no emoji. Caught by the seam test, which, like the title test, had been silently skipped: both are DOM-gated and were missing from the CI DOM list in test.yml. Registered now. React peer loosened back to ^19.2.3 (0.38.1 declared ^19.2.8 only because the dependency batch moved it; nothing in the package needs a newer API). Verified: DOM_TESTS=1 bun test --isolate on both alert test files 14/14, tsc clean, smoke:package against the published core 0.25.2, full ui suite unchanged.
backnotprop
added a commit
that referenced
this pull request
Sep 15, 2026
…d quotes #1509 hoisted an alert's bold-only first line onto the icon row and #1511 put a visually hidden "<Type>: " span there. Both changed the DOM text of an annotatable block, which the annotation layer reads. - Viewer turns on the hook's content-verifying restore. web-highlighter's stored metas are positional (`parentIndex` is the index among all elements of that tag), so a titled alert that stopped contributing its own `<p>` renumbers every later anchor: a pre-upgrade draft resolved silently onto the wrong text with nothing to reject it. Verification drops the bad resolve and falls through to the text-search rescue. Cost measured at ~5% of a 300-annotation restore (no extra DOM query; `getDoms` was already called). - The sr-only type word is marked `annotation-exclude`, and a new annotation's quote drops excluded chrome. The class alone was not enough: the highlighter skips excluded nodes when painting and searching, but the quote comes from the browser's selection string, so a drag starting over the icon still produced `originalText: "Tip:Browser quirks"` — a word the reviewer never selected, exported to the agent, and unfindable on a share-link restore. The painted highlight is now the authority on content and the selection string on formatting: excluded runs are removed and the result kept only when it matches what was painted, so any unrecognized shape leaves the quote as is. - An emoji-only first line becoming the alert's icon is intended (the documented grammar admits an emoji without a title precisely so it can be the icon); the existing case now records that decision and pins that the line is relocated, not duplicated.
backnotprop
added a commit
that referenced
this pull request
Sep 15, 2026
…d quotes (#1535) #1509 hoisted an alert's bold-only first line onto the icon row and #1511 put a visually hidden "<Type>: " span there. Both changed the DOM text of an annotatable block, which the annotation layer reads. - Viewer turns on the hook's content-verifying restore. web-highlighter's stored metas are positional (`parentIndex` is the index among all elements of that tag), so a titled alert that stopped contributing its own `<p>` renumbers every later anchor: a pre-upgrade draft resolved silently onto the wrong text with nothing to reject it. Verification drops the bad resolve and falls through to the text-search rescue. Cost measured at ~5% of a 300-annotation restore (no extra DOM query; `getDoms` was already called). - The sr-only type word is marked `annotation-exclude`, and a new annotation's quote drops excluded chrome. The class alone was not enough: the highlighter skips excluded nodes when painting and searching, but the quote comes from the browser's selection string, so a drag starting over the icon still produced `originalText: "Tip:Browser quirks"` — a word the reviewer never selected, exported to the agent, and unfindable on a share-link restore. The painted highlight is now the authority on content and the selection string on formatting: excluded runs are removed and the result kept only when it matches what was painted, so any unrecognized shape leaves the quote as is. - An emoji-only first line becoming the alert's icon is intended (the documented grammar admits an emoji without a title precisely so it can be the icon); the existing case now records that decision and pins that the line is relocated, not duplicated.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
@plannotator/ui0.38.2 on core 0.25.2 (core unchanged, not republished).aria-label="<Type>: <title>"on a plaindiv. ARIA prohibits naming a generic element; Chrome exposes it, WebKit drops it, so VoiceOver on Safari read only the bold title. The type word now rides a visually hiddensr-onlyspan before the title. Reported by the Workspaces design review of 0.38.1 (finding MEDIUM 2).alertIconRendererwas consulted even when the title line carried an emoji (result discarded). Now consulted only for a title line with an icon comment and no emoji, as documented.^19.2.3(0.38.1 declared^19.2.8from the dependency batch; nothing in the package needs it; consumers pinning 19.2.7 got an unmet-peer warning).Verification
DOM_TESTS=1 bun test --isolateon both alert test files: 14/14 (13/14 before fix 2).tsc --noEmit -p packages/ui/tsconfig.jsonclean.bun run --cwd packages/ui smoke:packageagainst the published core 0.25.2: passes (the registry check now runs for real).bun test packages/ui: unchanged, 0 fail.Do not publish from this PR; the owner publishes.