fix: make voiceover read title and description out of the table#4311
fix: make voiceover read title and description out of the table#4311JamalAlabdullah wants to merge 2 commits into
Conversation
📝 WalkthroughWalkthrough
ChangesSigneeList accessibility and test updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/layout/SigneeList/SigneeListComponent.test.tsx`:
- Around line 110-115: The SigneeListComponent test currently verifies the
heading, description text, and aria-label, but it does not confirm the table is
semantically associated with the description for assistive tech. Update the
assertions in SigneeListComponent.test.tsx around the Signee List checks to
verify the table element rendered by the SigneeList component has an
aria-describedby that points to the description element’s id, using the existing
table/description queries and the signee-list test id as anchors. Also apply the
same linkage assertion in the other affected test block referenced by the
comment.
In `@src/layout/SigneeList/SigneeListComponent.tsx`:
- Around line 51-56: The table in SigneeListComponent only has an aria-label, so
the rendered Description is not exposed as context to assistive tech. Update the
Description/AppTable wiring by giving the Description a stable id and passing
that id into AppTable via aria-describedby (alongside the existing aria-label)
so the description is announced for the table.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2166f404-24f6-42d0-9345-7d337cc1f6b6
📒 Files selected for processing (2)
src/layout/SigneeList/SigneeListComponent.test.tsxsrc/layout/SigneeList/SigneeListComponent.tsx
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/e2e/integration/signering-brukerstyrt/signing.ts (1)
91-93: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueThe split into heading/description/table assertions matches the new component structure (separate
Heading,Description, andAppTablewithariaLabelfrom the title). The two blocks are identical; consider extracting a small helper to avoid drift if the labels change later.Also applies to: 125-127
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/e2e/integration/signering-brukerstyrt/signing.ts` around lines 91 - 93, The repeated heading/description/table assertions in signing.ts are duplicated in multiple places and should be centralized to avoid future drift. Extract the shared checks into a small helper that verifies the title-based `Heading`, `Description`, and `AppTable` `ariaLabel` together, then reuse it at both assertion sites so label changes only need to be updated once.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@test/e2e/integration/signering-brukerstyrt/signing.ts`:
- Around line 91-93: The repeated heading/description/table assertions in
signing.ts are duplicated in multiple places and should be centralized to avoid
future drift. Extract the shared checks into a small helper that verifies the
title-based `Heading`, `Description`, and `AppTable` `ariaLabel` together, then
reuse it at both assertion sites so label changes only need to be updated once.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3b9fc1c8-691b-4cee-b0c0-c7975d9cbae3
📒 Files selected for processing (2)
test/e2e/integration/frontend-test/party-selection.tstest/e2e/integration/signering-brukerstyrt/signing.ts
|



Description
It can be tested in : aarsregnskap-vanlig-202406
After:
AfterFix.mov
Verification/QA
kind/*andbackport*label to this PR for proper release notes groupingSummary by CodeRabbit
Bug Fixes
Tests