KEMBAR78
refactor!: update login-form to use shadow DOM and slotted form by web-padawan · Pull Request #9792 · vaadin/web-components · GitHub
Skip to content

Conversation

@web-padawan
Copy link
Member

@web-padawan web-padawan commented Jul 23, 2025

Description

Fixes #9694
Fixes #9793

  • Updated vaadin-login-form to use shadow DOM and initialize slotted elements using controllers / Lit template
  • Added exportparts on the login-form-wrapper to make part elements stylable via vaadin-login-form::part()
  • Changed display to block on the form wrapper as using inline-block causes extra whitespace to be shown
    • This affected standalone login form screenshot height as the wrapper element there also uses inline-block
  • Removed <section part="form"> and changed vaadin-login-form-wrapper to use role="region"
    • The part="form" will therefore be set on the login form wrapper itself now and still be available for styling

Type of change

  • Breaking change

Note

Tested in screen readers and announcements look good, "Log In region" is announced:

VoiceOver

Screenshot 2025-07-23 at 15 09 59

NVDA

Screenshot 2025-07-23 at 15 13 48

JAWS

Screenshot 2025-07-23 at 15 16 31

@web-padawan web-padawan requested a review from sissbruecker July 23, 2025 10:01
return css`
:host {
display: block;
max-width: max-content;
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this to make centering easier by setting margin: 0 auto on the form element.
This seems like a better option than using display: inline-block to me.

@web-padawan web-padawan requested a review from sissbruecker July 24, 2025 12:38
@sonarqubecloud
Copy link

@web-padawan web-padawan merged commit aff6590 into main Jul 24, 2025
10 checks passed
@web-padawan web-padawan deleted the refactor/login-form-slotted branch July 24, 2025 13:46
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 25.0.0-beta2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants