Skip to content

IS-11218 Render BankID QR accessibility messages as collapsible sections#253

Draft
aleixsuau wants to merge 1 commit into
devfrom
feature/dev/IS-11218-bankid-accessibility-messages
Draft

IS-11218 Render BankID QR accessibility messages as collapsible sections#253
aleixsuau wants to merge 1 commit into
devfrom
feature/dev/IS-11218-bankid-accessibility-messages

Conversation

@aleixsuau

@aleixsuau aleixsuau commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Jira: https://curity.atlassian.net/browse/IS-11218

Frontend counterpart to the BankID server work (server PR #10231) that adds QR-code accessibility messages under metadata.viewData.messages.

What

Renders the BankID QR accessibility messages in BankIdViewNameBuiltInUI as two collapsible <details> sections — "Help with scanning the QR code" (instruction.*) and "If you are using a screen reader" (screen-reader.*) — mirroring the classic Velocity layout.

Test instructions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI 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.

Pull request overview

Adds frontend support for BankID QR-code accessibility messages delivered via metadata.viewData.messages, rendering them in the built-in BankID UI as two collapsible <details> sections to match the classic Velocity layout.

Changes:

  • Introduces HaapiStepperBankIdQrAccessibilityMessages to render “instruction.” and “screen-reader.” message groups as collapsible sections.
  • Adds message-key normalization via getQrViewDataMessages to resolve keys by their .view.qr.<suffix> tail.
  • Extends HAAPI step typings with metadata.viewData.messages, adds styling and documents the new CSS hook.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/haapi-react-sdk/haapi-stepper/util/qr-view-data-messages.ts Adds normalization helper for .view.qr.-scoped message keys.
src/haapi-react-sdk/haapi-stepper/README.md Documents the new .haapi-stepper-bankid-qr-accessibility CSS hook.
src/haapi-react-sdk/haapi-stepper/feature/viewnames/index.ts Exports the new BankID QR accessibility messages component.
src/haapi-react-sdk/haapi-stepper/feature/viewnames/HaapiStepperBankIdQrAccessibilityMessages.tsx Implements the collapsible accessibility sections for BankID QR messages.
src/haapi-react-sdk/haapi-stepper/feature/viewnames/HaapiStepperBankIdQrAccessibilityMessages.spec.tsx Adds test coverage for rendering and toggle behavior.
src/haapi-react-sdk/haapi-stepper/feature/viewnames/BankIdViewNameBuiltInUI.tsx Wires the new component into the built-in BankID view.
src/haapi-react-sdk/haapi-stepper/data-access/types/haapi-step.types.ts Adds HaapiViewData and types metadata.viewData (incl. messages).
src/haapi-react-app/src/shared/util/css/styles.css Styles the new container and <details> spacing/behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +346 to +348
/**
* View-specific data attached to the response. The shape depends on the view that produced it;
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants