From 3453cacaea6f668a6d20bda5c13774816c6c762f Mon Sep 17 00:00:00 2001 From: Cilibiu Bogdan Date: Mon, 12 Aug 2019 18:41:32 +0300 Subject: [PATCH] [ADF-4802] Login accessibility (#4988) * login button aria label * password toggle accessibility * translation * fix test * fix automation if --- lib/core/i18n/en.json | 14 ++++++---- .../login/components/login.component.html | 27 ++++++++++++------- .../login/components/login.component.spec.ts | 16 +++++++---- lib/core/login/components/login.component.ts | 3 ++- lib/testing/src/lib/core/pages/login.page.ts | 5 ++-- 5 files changed, 42 insertions(+), 23 deletions(-) diff --git a/lib/core/i18n/en.json b/lib/core/i18n/en.json index 46d6b0cc29..74153f1629 100644 --- a/lib/core/i18n/en.json +++ b/lib/core/i18n/en.json @@ -5,8 +5,8 @@ "CLAIM": "CLAIM", "UNCLAIM": "RELEASE", "START PROCESS": "START PROCESS", - "NOTIFICATION_HISTORY":{ - "NO_MESSAGE" : "No messages", + "NOTIFICATION_HISTORY": { + "NO_MESSAGE": "No messages", "NOTIFICATIONS": "Notifications", "MARK_AS_READ": "Mark all as read" }, @@ -208,13 +208,17 @@ } }, "LOGIN": { - "LOGO": "Alfresco", + "LOGO": "Alfresco, make business flow", "LABEL": { "LOGIN": "Sign in", "USERNAME": "Username", "PASSWORD": "Password", "REMEMBER": "Remember me" }, + "ARIA-LABEL": { + "SHOW-PASSWORD": "Show password", + "HIDE-PASSWORD": "Hide password" + }, "MESSAGES": { "USERNAME-REQUIRED": "Required", "USERNAME-MIN": "Your username needs to be at least {{ minLength }} characters.", @@ -253,8 +257,8 @@ "TOOLTIP": "Content actions" }, "ACCESSIBILITY": { - "SELECT_ALL": "Select all", - "SELECT_FILE": "Select file" + "SELECT_ALL": "Select all", + "SELECT_FILE": "Select file" } }, "USER_PROFILE": { diff --git a/lib/core/login/components/login.component.html b/lib/core/login/components/login.component.html index 2fe61bba22..bed6724a4b 100644 --- a/lib/core/login/components/login.component.html +++ b/lib/core/login/components/login.component.html @@ -58,14 +58,21 @@ [formControl]="form.controls['password']" id="password" data-automation-id="password"> - - visibility - - - visibility_off - +