diff --git a/.plans/accessibility-implementation-progress.md b/.plans/accessibility-implementation-progress.md index 1bf78c27..a4ce45e1 100644 --- a/.plans/accessibility-implementation-progress.md +++ b/.plans/accessibility-implementation-progress.md @@ -209,3 +209,56 @@ a3109c63 - Add ARIA labels to icon-only buttons across the application - `app/views/submit_form/show.html.erb` - Added alt text to 1 image **Total Lines Changed**: ~50 lines (additions/modifications) + +--- + +## Session Summary - 2026-02-25 (PDF View/Text View Tab Switcher) + +### Completed: PDF View / Text View Tab Switcher (branch: extract-content-from-pdf) + +✅ **Create `lib/pdf_text_to_html.rb` heuristic parser** +- ALL_CAPS lines → `
` (RTL-safe)
+- Uses `ERB::Util.html_escape` for XSS safety; refactored into `call` + `process_line` to satisfy rubocop MethodLength
+- Rubocop clean, verified against NDA-style sample text
+
+✅ **Create `app/javascript/elements/document_tabs.js`** custom element
+- ARIA APG tab pattern: `role="tab"`, `role="tabpanel"`, `aria-selected`, `aria-controls`
+- Roving tabindex, ArrowLeft/Right/Home/End keyboard navigation
+- `localStorage` key `docuseal_document_view` for Turbo Drive persistence
+- Active state classes toggled via `classList.toggle` (DaisyUI-compatible)
+- ESLint clean
+
+✅ **Register element in `app/javascript/application.js`**
+
+✅ **Add 5 i18n keys to `config/locales/i18n.yml`**
+- `pdf_view`, `text_view`, `document_view_options`, `text_view_disclaimer`, `signing_fields_below`
+
+✅ **Add tab switcher to `app/views/submissions/show.html.erb`**
+- `has_full_text` gate: all docs need `pages_text.size >= n_pages`
+- When true: `