Skip to content

feat: Modal focus trapping and ARIA attributes (a11y)#129

Open
Axel-DaMage wants to merge 1 commit into
mainfrom
feat/9-modal-focus-trap
Open

feat: Modal focus trapping and ARIA attributes (a11y)#129
Axel-DaMage wants to merge 1 commit into
mainfrom
feat/9-modal-focus-trap

Conversation

@Axel-DaMage

Copy link
Copy Markdown
Owner

Cambios

  • Crea focusTrap.ts action: atrapa el foco Tab dentro del modal, cicla entre primer/último elemento
  • Restaura el foco al elemento activo anterior al cerrar el modal
  • Agrega role="dialog", aria-modal="true", aria-label al overlay del modal
  • autofocus en botón de cierre para foco inicial

Closes #9

- Create focusTrap.ts action: traps Tab cycling within modal, restores focus on close
- Add role='dialog', aria-modal='true', aria-label to modal overlay
- Add autofocus to close button for initial focus
- Focus restoration to previously active element on modal close

Closes #9
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.

Modal Focus Trapping & ARIA Attributes (a11y)

1 participant