Layout for Open-Questions revised#3941
Conversation
Rework open-questions.twig to provide an accessible, responsive layout, optimized for screenreader Fix: - empty collumn on missing permissions or content (disturbed high contrast mode) - Added semantic table structure (<thead>, <tbody>, <caption> for improved accessibility and optimized display. - desktop uses a table with colgroup/aria attributes and mobile uses card-based presentation. -Appearance adapted to startpage - showActionColumn logic (based on user permission or presence of linked answers) and an info alert for invisible questions. - Update translations (msgQuestion2) to "Category / Question" in English and German to reflect the combined column label. - Update QuestionsController to allow guest submissions when records.allowNewFaqsForGuests is enabled (included in userHasPermissionToAnswer check).
📝 WalkthroughWalkthroughResponsive and accessible refactor of the open questions UI with conditional action-column logic; backend grants guest answer access when configured and exposes a new Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Controller as QuestionsController
participant Config as Config/Permissions
participant Template as open-questions.twig
Client->>Controller: Request open questions page
Controller->>Config: Check userHasPermissionToAnswer & records.allowNewFaqsForGuests
Config-->>Controller: permissionFlags (userHasPermissionToAnswer, allowNewFaqsForGuests)
Controller->>Template: render with vars (questions, showActionColumn, msgEmailTo, totals)
Template-->>Client: responsive HTML (table or cards, optional action buttons)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 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 |
Rework open-questions.twig to provide an accessible, responsive layout, optimized for screenreader
Fix:
Summary by CodeRabbit
New Features
Improvements