@@ -744,7 +744,7 @@ function Login(props) {
744
744
} ;
745
745
746
746
const GetLoginData = async ( ) => {
747
- setState ( { ...state , loading : true } )
747
+ setState ( { ...state , loading : true } )
748
748
try {
749
749
Parse . serverURL = localStorage . getItem ( "baseUrl" ) ;
750
750
Parse . initialize ( localStorage . getItem ( "parseAppId" ) ) ;
@@ -925,6 +925,7 @@ function Login(props) {
925
925
< Title title = { "Login Page" } />
926
926
{ state . loading && (
927
927
< div
928
+ aria-live = "assertive"
928
929
style = { {
929
930
position : "fixed" ,
930
931
width : "100vw" ,
@@ -936,63 +937,66 @@ function Login(props) {
936
937
} }
937
938
>
938
939
< div
940
+ role = "status"
939
941
style = { {
940
942
position : "fixed" ,
941
943
fontSize : "50px" ,
942
944
color : "#3ac9d6" ,
943
945
top : "50%" ,
944
- left : "45%"
946
+ left : "50%" ,
947
+ transform : 'translate(-50%, -50%)'
945
948
} }
946
949
className = "loader-37"
947
- > </ div >
950
+ >
951
+ < span className = "sr-only" > Loading...</ span >
952
+ </ div >
948
953
</ div >
949
954
) }
950
955
{ props . isloginVisible && props . isloginVisible ? (
951
- < div >
956
+ < div aria-labelledby = "loginHeading" role = "region" >
952
957
< div className = "md:m-10 lg:m-16 md:p-4 lg:p-10 p-5 bg-[#ffffff] md:border-[1px] md:border-gray-400 " >
953
958
< div className = "w-[250px] h-[66px] inline-block" >
954
959
{ state . hideNav ? (
955
- < img src = { image } width = "100%" alt = "" />
960
+ < img src = { image } width = "100%" alt = "The image displays the OpenSign logo with a stylized blue square with an open corner, accompanied by the tagline Seal the Deal, Openly. " />
956
961
) : (
957
- < img src = { image } width = "100%" alt = "" />
962
+ < img src = { image } width = "100%" alt = "The image displays the OpenSign logo with a stylized blue square with an open corner, accompanied by the tagline Seal the Deal, Openly. " />
958
963
) }
959
964
</ div >
960
965
< div className = "grid grid-cols-1 md:grid-cols-2 gap-x-2" >
961
- < div className = "" >
966
+ < div >
962
967
< div >
963
- < form onSubmit = { handleSubmit } >
964
- < h2 className = "text-[30px] mt-6" > Welcome Back !</ h2 >
965
- < span className = "text-[12px] text-[#878787]" >
966
- Login to your account
967
- </ span >
968
- < div className = "shadow-md rounded my-4" >
968
+ < form onSubmit = { handleSubmit } aria-label = "Login Form" >
969
+ < h1 className = "text-[30px] mt-6" > Welcome Back!</ h1 >
970
+ < fieldset className = "outline outline-1 outline-slate-300/50 my-4" >
971
+ < legend className = "text-xs font-bold px-6 mt-4" > Login to your account</ legend >
969
972
< div className = "px-6 py-4" >
970
- < label className = "block text-xs" > Username</ label >
973
+ < label className = "block text-xs" htmlFor = "email" > Username</ label >
971
974
< input
975
+ id = "email"
972
976
type = "text"
973
- className = "px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
977
+ className = "px-3 py-2 w-full border-[1px] border-gray-300 rounded text-xs"
974
978
name = "email"
975
979
value = { state . email }
976
980
onChange = { handleChange }
977
981
required
978
982
/>
979
983
< hr className = "my-2 border-none" />
980
- < label className = "block text-xs" > Password</ label >
984
+ < label className = "block text-xs" htmlFor = "password" > Password</ label >
981
985
< div className = "relative" >
982
986
< input
987
+ id = "password"
983
988
type = { state . passwordVisible ? "text" : "password" }
984
- className = "px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
989
+ className = "px-3 py-2 w-full border-[1px] border-gray-300 rounded text-xs"
985
990
name = "password"
986
991
value = { state . password }
987
992
onChange = { handleChange }
988
993
required
989
994
/>
990
995
< span
991
- className = { `absolute top-[50%] right-[10px] -translate-y-[50%] cursor-pointer ${
992
- state . passwordVisible
993
- ? "text-[#007bff]"
994
- : "text-black"
995
- } `}
996
+ className = { `absolute top-[50%] right-[10px] -translate-y-[50%] cursor-pointer ${ state . passwordVisible
997
+ ? "text-[#007bff]"
998
+ : "text-black"
999
+ } `}
996
1000
onClick = { togglePasswordVisibility }
997
1001
>
998
1002
{ state . passwordVisible ? (
@@ -1003,32 +1007,32 @@ function Login(props) {
1003
1007
</ span >
1004
1008
</ div >
1005
1009
</ div >
1006
- </ div >
1007
- < div className = "flex flex-row justify-between items-center text-xs px-4 py-2" >
1010
+ </ fieldset >
1011
+ < div className = "flex flex-row justify-between items-center px-4 py-2" >
1008
1012
< div >
1009
- < label className = "form-check-label" >
1013
+ < label className = "form-check-label inline-block cursor-pointer" htmlFor = "rememberpassword ">
1010
1014
< input
1011
1015
type = "checkbox"
1012
- className = "form-check-input"
1016
+ className = "form-check-input mr-2 "
1013
1017
value = ""
1018
+ id = "rememberpassword"
1014
1019
/>
1015
- < span className = "text-center pl-1" >
1016
- Remember Password
1017
- </ span >
1020
+ < span className = "text-[13px] pl-1" > Remember Password</ span >
1018
1021
</ label >
1019
1022
</ div >
1020
1023
< div >
1021
- < span className = "text-[13px]" >
1022
- < NavLink to = { `/forgetpassword` } >
1023
- Forgot Password ?
1024
- </ NavLink >
1025
- </ span >
1024
+ < NavLink
1025
+ to = "/forgetpassword"
1026
+ className = "text-[13px] underline focus:outline-none focus:ring-2 focus:ring-blue-600"
1027
+ >
1028
+ Forgot Password?
1029
+ </ NavLink >
1026
1030
</ div >
1027
1031
</ div >
1028
1032
< div className = "flex flex-col md:flex-row justify-between items-stretch gap-8 text-center text-xs font-bold mt-2" >
1029
1033
< button
1030
1034
type = "submit"
1031
- className = "rounded-sm bg-[#3ac9d6] text-white w-full py-3 shadow uppercase"
1035
+ className = "rounded-sm bg-[#3ac9d6] text-white w-full py-3 shadow outline-none uppercase focus:ring-2 focus:ring-blue-600 "
1032
1036
disabled = { state . loading }
1033
1037
>
1034
1038
{ state . loading ? "Loading..." : "Login" }
@@ -1093,7 +1097,7 @@ function Login(props) {
1093
1097
} }
1094
1098
>
1095
1099
{ props . appInfo . googleClietId &&
1096
- props . appInfo . googleClietId !== "" ? (
1100
+ props . appInfo . googleClietId !== "" ? (
1097
1101
< GoogleSignInBtn
1098
1102
GoogleCred = { props . appInfo . googleClietId }
1099
1103
thirdpartyLoginfn = { thirdpartyLoginfn }
@@ -1107,14 +1111,18 @@ function Login(props) {
1107
1111
{ ! state . hideNav && (
1108
1112
< div className = "self-center" >
1109
1113
< div className = "mx-auto md:w-[300px] lg:w-[500px]" >
1110
- < img src = { login_img } alt = "bisec " width = "100%" />
1114
+ < img src = { login_img } alt = "The image illustrates a person from behind, seated at a desk with a four-monitor computer setup, in an environment with a light blue and white color scheme, featuring a potted plant to the right. " width = "100%" />
1111
1115
</ div >
1112
1116
</ div >
1113
1117
) }
1114
1118
</ div >
1115
1119
</ div >
1116
1120
1117
- < div id = "snackbar" style = { { backgroundColor : state . toastColor } } >
1121
+ < div
1122
+ id = "snackbar"
1123
+ role = "alert"
1124
+ style = { { backgroundColor : state . toastColor } }
1125
+ >
1118
1126
{ state . toastDescription }
1119
1127
</ div >
1120
1128
</ div >
0 commit comments