Navegación por teclado en el autocompletar de productos de la pantalla de revisión#27
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add keyboard navigation for product autocomplete in review screen
Add keyboard navigation to review-screen product autocomplete
Apr 22, 2026
FacturaScripts Playground Preview
Try this PR in your browser This preview is generated automatically for the |
On the post-scan review screen, the per-line product autocomplete can now be driven entirely from the keyboard (#26): - Arrow up/down move the highlight (with auto-scroll), the first suggestion is highlighted by default. - Enter selects the highlighted suggestion; Tab selects it and moves focus to the next field; Escape closes the dropdown keeping the typed text. - Full ARIA listbox semantics (role, aria-activedescendant, aria-selected). Keyboard logic is extracted into the pure resolveAutocompleteKeyAction() helper and unit-tested. Also dedupes the product-match badge/assignment logic and fixes a stale data-field="description" lookup (should be "descripcion").
f00e7f8 to
f35826d
Compare
erseco
added a commit
that referenced
this pull request
May 31, 2026
…S.md (#54) - Document the live upload -> AI extraction -> review -> import flow (make up, port, login, provider selection, fixtures) so the merged features can be exercised against a real provider, mirroring the ScheduledMail recipe. - Add Test/e2e-smoke.php: a non-interactive helper that runs the extraction + map + import path over the fixtures and reports invoice/attachment/warnings. - Fix outdated CI matrix references (8.1-8.4 -> 8.1-8.5 after the 8.5 addition). - Exclude the dev-only smoke helper from PHPCS, like the other Test/ scripts. No functional defects were found end-to-end testing today's merged PRs (#27 keyboard nav, #29 image attachments, #46 stock/purchase data, #48 payment method, #41 localized warnings, #31 tax-inclusive receipts); this PR only adds the validation guide, the smoke helper and the doc fixes.
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.
Implementa el #26: navegación por teclado en el autocompletar de productos de la pantalla de revisión (la que aparece tras escanear una factura de proveedor).
Qué hace
En cada línea, el campo de producto ahora se maneja por completo con el teclado, sin soltar las manos del teclado al revisar muchas líneas seguidas:
Detalles técnicos
resolveAutocompleteKeyAction()(mapea tecla + estado → acción), con tests unitarios.role="listbox"/"option",aria-expanded,aria-activedescendant,aria-selected,aria-controls.AiScanInvoice?action=search-products, con control de carreras (se ignoran respuestas obsoletas).buildProductMatchBadge/setLineProductMatch) en vez de duplicarla.data-field="description"cuando el campo real esdescripcion(la descripción llegaba siempre vacía).Verificación
main(resueltos los solapes con Añadir actualización opcional de stock y datos de compra al importar facturas #46 en el mismo fichero JS).Closes #26