Observed behavior
When opening the document export modal, focus is positioned on the "Cancel" button instead of the first focusable element of the modal, namely the export format selection dropdown menu.
Expected behavior
Following the ARIA APG [Dialog (Modal) Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/), focus should be moved to the first focusable element of the modal when it opens, i.e. the format selection dropdown menu.
Steps to reproduce
- Open a Docs document
- Trigger the document export
- Observe that when the modal opens, focus is positioned on the "Cancel" button and not on the format selection dropdown menu
Additional context / Screenshots
The APG pattern specifies that focus should be placed on the first focusable element of the dialog, unless the design requires targeting a specific element (e.g., a dangerous confirmation button). This case does not apply here: the "Cancel" button is not the most relevant element to highlight on opening.
RGAA criteria
Critère 7.1 : Chaque script est-il, si nécessaire, compatible avec les technologies d'assistance ?
Impact
A user navigating with keyboard or screen reader opens the export modal: focus lands on "Cancel", forcing them to navigate backwards to reach the format selection dropdown menu, the first useful element of the modal.
Prioritization
P1
Observed behavior
When opening the document export modal, focus is positioned on the "Cancel" button instead of the first focusable element of the modal, namely the export format selection dropdown menu.
Expected behavior
Following the ARIA APG [Dialog (Modal) Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/), focus should be moved to the first focusable element of the modal when it opens, i.e. the format selection dropdown menu.
Steps to reproduce
Additional context / Screenshots
The APG pattern specifies that focus should be placed on the first focusable element of the dialog, unless the design requires targeting a specific element (e.g., a dangerous confirmation button). This case does not apply here: the "Cancel" button is not the most relevant element to highlight on opening.
RGAA criteria
Critère 7.1 : Chaque script est-il, si nécessaire, compatible avec les technologies d'assistance ?
Impact
A user navigating with keyboard or screen reader opens the export modal: focus lands on "Cancel", forcing them to navigate backwards to reach the format selection dropdown menu, the first useful element of the modal.
Prioritization
P1