Skip to content

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Aug 13, 2025

Description

Related to #9759

  • Added aria-modal="true" on the vaadin-confirm-dialog host element
  • Changed from display: contents to display: block for Safari VoiceOver
  • Moved tabindex="0" from the overlay part to the confirm-dialog itself

Both display: contents and tabindex change are needed to make sure Safari VoiceOver web rotor doesn't list elements outside the dialog, which happened especially when focus was on the overlay part in shadow DOM.

Type of change

  • Refactor

@web-padawan web-padawan force-pushed the refactor/confirm-dialog-aria-modal branch from 206e8e7 to beb0672 Compare August 14, 2025 08:30
@web-padawan web-padawan changed the title refactor: set aria-modal attribute on the confirm-dialog refactor: set aria-modal and tabindex on the confirm-dialog Aug 14, 2025
}

:host,
:host([hidden]) {
display: none !important;
}

:host(:focus) ::part(overlay) {
outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default this only applies to base styles, as Lumo resets both of these properties:

:where(:root, :host) {
--vaadin-focus-ring-color: inherit;
--vaadin-focus-ring-width: inherit;

IMO it's ok as in V24, there is no default focus indicator on the overlay part in Lumo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we then also disable aria modal controller for the components we refactor? Or do we do that afterwards? Removing it right away would make testing the PRs a bit safer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it sounds reasonable. I will update the PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link

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.

2 participants