Skip to content

Commit

Permalink
Improve accessibility of registration
Browse files Browse the repository at this point in the history
Fixes #204
  • Loading branch information
Brutus5000 committed Dec 28, 2023
1 parent 5f82aa0 commit b4312fc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
5 changes: 5 additions & 0 deletions frontend/themes/faforever/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ html {
background-color: white;
}

vaadin-text-field[readonly]::part(input-field) {
background-color: #dddddd;
}

input {
outline: none;
}
Expand Down Expand Up @@ -111,6 +115,7 @@ header {

a, a:visited {
color: black;
text-decoration: underline dotted black;
}

a:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ class ActivateView(private val registrationService: RegistrationService, private

registrationService.activate(registeredUser, ipAddress, password.value)

val successDialog = Dialog()
successDialog.add(H2(getTranslation("register.activated")))
successDialog.add(Span(getTranslation("register.activated.details")))
successDialog.open()
Dialog().apply {
add(H2(getTranslation("register.activated")))
add(Span(getTranslation("register.activated.details")))
isCloseOnOutsideClick = false
open()
}

binder.readBean(null)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,12 @@ class RegisterView(private val registrationService: RegistrationService, fafProp

registrationService.register(username.value, email.value)

val successDialog = Dialog()
successDialog.add(H2(getTranslation("register.success")))
successDialog.add(Span(getTranslation("register.success.details", email.value)))
successDialog.open()
Dialog().apply {
add(H2(getTranslation("register.success")))
add(Span(getTranslation("register.success.details", email.value)))
isCloseOnOutsideClick = false
open()
}

binder.readBean(null)
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ register.success=Account Registered
register.success.details=You have successfully registered. Please use the link sent to {0} to activate your account.
register.activate=Activate Your Account
register.activated=Account Activated
register.activated.details=You have successfully activated your account. Please note that in order to play online you will need prove ownership of the game
register.activated.details=You have successfully activated your account. Please note that in order to play online you will need prove ownership of the game.
register.username=Username
register.username.required=Username required
register.username.taken=Username is taken, please choose another username
Expand All @@ -77,7 +77,7 @@ register.password.size=Password must be at least 6 characters
register.password.match=Passwords must match
register.email=Email
register.email.taken=Email is already registered to another user
register.email.blacklisted=The supplied email domain is blacklisted please use another email
register.email.blacklisted=The supplied email domain is blacklisted. Please use different email provider.
register.email.invalid=Email is not a valid address
register.readAndAgree=I have read and agree to the
register.termsOfService=Terms of Service
Expand Down

0 comments on commit b4312fc

Please sign in to comment.