Conversation
The add reaction, resolve, re-open and more actions buttons in a comment contain only an icon and passed their text as mainTooltip but not as label, which is what the Mantine, Ariakit and ShadCN toolbar buttons use for aria-label. Screen readers announced each one as a bare "button". Part of TypeCellOS#2824
|
@adarshsm is attempting to deploy a commit to the TypeCell Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
@blocknote/xl-typst-exporter
commit: |
This branch has not been deployed
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.
Summary
Part of #2824 (the "unlabeled buttons" half). The icon-only action buttons on a comment in the threads sidebar / floating thread — Add reaction, Resolve / Re-open and More actions — have no accessible name, so screen readers announce each of them as just "button".
Rationale
The toolbar buttons in all three UI kits (
packages/mantine/src/toolbar/ToolbarButton.tsx,packages/ariakit/src/toolbar/ToolbarButton.tsx,packages/shadcn/src/toolbar/Toolbar.tsx) setaria-labelfrom thelabelprop.mainTooltipis only used for the visual tooltip anddata-test. The formatting toolbar buttons pass both (e.g.BasicTextStyleButton,CreateLinkButton), but the four icon-only buttons inComment.tsxonly passmainTooltip, so theiraria-labelends upundefinedand the button contains nothing but an SVG.Changes
packages/react/src/components/Comments/Comment.tsx: passlabel(same dictionary string asmainTooltip) to the add reaction, resolve, re-open and more actions buttons.The Save / Cancel buttons shown while editing a comment already have visible text, so they're left as they are.
Impact
aria-labelattribute. Theirdata-testvalues (e.g.moreactions, which the comments e2e test uses) still come frommainTooltip, so they don't change. No visual change.Commentcomponents, which I'd rather leave to you.Testing
packages/react/src/components/Comments/Comment.test.tsx. It rendersCommentto static markup with the UI kit components stubbed out (the stub button forwardslabeltoaria-labellike the real ones) and checks the accessible names of the action buttons, for both a resolved and an unresolved thread.main([undefined, undefined, undefined]) and passes with the fix.vp test --runinpackages/react: 3 files / 6 tests pass.vp lintandvp fmt --checkare clean on the changed files.Checklist
packages/reactunit tests only; e2e not run locally.)🤖 Generated with Claude Code